From e66363333a6ac8fd8fbb1126cd971a46ef674caa Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Jun 2022 15:32:42 -0400 Subject: [PATCH 0001/1385] Update uptimekuma-v3.sh --- ct/uptimekuma-v3.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/uptimekuma-v3.sh b/ct/uptimekuma-v3.sh index 0820e29b..56b2afe9 100644 --- a/ct/uptimekuma-v3.sh +++ b/ct/uptimekuma-v3.sh @@ -91,8 +91,8 @@ function default_settings() { DISK_SIZE="4" 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 ${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}" @@ -196,9 +196,9 @@ header_info 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 " + echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 1024 " read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; + 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 From 3f62f3398f1b0d54069506cb54b2459663e53cd6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Jun 2022 15:41:27 -0400 Subject: [PATCH 0002/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a604360..e3c422d8 100644 --- a/README.md +++ b/README.md @@ -1289,7 +1289,7 @@ To create a new Proxmox Uptime Kuma LXC, run the following in the Proxmox Shell. bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/uptimekuma-v3.sh)" ``` -

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

+

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

**Uptime Kuma Interface - IP:3001** From fd24fe4cfed3b58b42d773e5b0de3548867f0fba Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Jun 2022 15:57:33 -0400 Subject: [PATCH 0003/1385] Update uptimekuma-update.sh --- misc/uptimekuma-update.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/misc/uptimekuma-update.sh b/misc/uptimekuma-update.sh index 2106071d..70e77dcb 100644 --- a/misc/uptimekuma-update.sh +++ b/misc/uptimekuma-update.sh @@ -1,4 +1,5 @@ #!/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"` @@ -11,7 +12,7 @@ HOLD="-" CM="${GN}✓${CL}" APP="Uptime Kuma" while true; do - read -p "This will Update ${APP} LXC. Proceed(y/n)?" yn + read -p "This will Update ${APP} to ${LATEST}. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; @@ -45,24 +46,24 @@ function msg_ok() { } -msg_info "Stopping Uptime Kuma" +msg_info "Stopping ${APP}" sudo systemctl stop uptime-kuma &>/dev/null -msg_ok "Stopped Uptime Kuma" +msg_ok "Stopped ${APP}" cd /opt/uptime-kuma -msg_info "Pulling Uptime Kuma" +msg_info "Pulling ${APP} ${LATEST}" git fetch &>/dev/null -git checkout master &>/dev/null +git checkout $LATEST &>/dev/null git pull &>/dev/null -msg_ok "Pulled Uptime Kuma" +msg_ok "Pulled ${APP} ${LATEST}" -msg_info "Updating Uptime Kuma (Patience)" +msg_info "Updating ${APP} to ${LATEST} (Patience)" npm ci &>/dev/null -msg_ok "Updated Uptime Kuma" +msg_ok "Updated ${APP}" -msg_info "Starting Uptime Kuma" +msg_info "Starting ${APP}" sudo systemctl start uptime-kuma &>/dev/null -msg_ok "Started Uptime Kuma" +msg_ok "Started ${APP}" msg_ok "Done!" From c44576efbfd4229ed40d838fe88610b8951847c9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Jun 2022 08:15:01 -0400 Subject: [PATCH 0004/1385] 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 ef59d398..9e0e26e1 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -2,7 +2,7 @@ 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"` From e21e413ee5401213232b4c128b04e211c452ac13 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Jun 2022 13:21:53 -0400 Subject: [PATCH 0005/1385] Update whoogle-install.sh --- setup/whoogle-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index 66c3614b..ce4803f6 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -73,7 +73,7 @@ pip install whoogle-search &>/dev/null service_path="/etc/systemd/system/whoogle.service" echo "[Unit] -Description=ESPHome Dashboard +Description=Whoogle-Search After=network.target [Service] ExecStart=/usr/local/bin/whoogle-search --host 0.0.0.0 From 758004ac18b830ed7db1d083fbcb2b012b803ca8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Jun 2022 08:46:55 -0400 Subject: [PATCH 0006/1385] Update post-install-v3.sh --- misc/post-install-v3.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/misc/post-install-v3.sh b/misc/post-install-v3.sh index 2d56301c..19926093 100644 --- a/misc/post-install-v3.sh +++ b/misc/post-install-v3.sh @@ -103,5 +103,10 @@ echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxli apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled Subscription Nag" fi -msg_ok "Finished....Please Update Proxmox" + +msg_info "Updating Proxmox" +sleep 2 +apt-get update +apt-get dist-upgrade +msg_ok "Finished" From 95b59f5aaa8235a06456d9f83f28ad779377eb37 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Jun 2022 16:26:04 -0400 Subject: [PATCH 0007/1385] Set up a Home Assistant OS VM using Proxmox VE 7 (2022) --- misc/set-up-haosvm-using-proxmox-7.md | 75 +++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 misc/set-up-haosvm-using-proxmox-7.md diff --git a/misc/set-up-haosvm-using-proxmox-7.md b/misc/set-up-haosvm-using-proxmox-7.md new file mode 100644 index 00000000..1ddab901 --- /dev/null +++ b/misc/set-up-haosvm-using-proxmox-7.md @@ -0,0 +1,75 @@ +# Set up a Home Assistant OS VM using Proxmox VE 7 (2022) + +This guide will help you set up a Home Assistant OS VM, on almost any x86/64 machine type you choose using Proxmox VE 7 as the operating system. +This guide also utilizes scripts to simplify the installation process, always remember to use due diligence when sourcing scripts and automation tasks from third-party sites. + +This installation uses an **Official KVM Image provided by the Home Assistant Team and is considered a supported installation method**. This method of installation is considered easy/medium difficulty and some knowledge of how to use and interact with Linux is suggested. + +If you have an existing Home Assistant installation and would like to know how to backup your current configuration to restore later, please see the documentation on [backing up and restoring your configuration](https://www.home-assistant.io/common-tasks/supervised/#making-a-backup-from-the-ui). + +## Installing Proxmox VE 7 + +* You will want to ensure **UEFI Boot & Virtualisation is enabled and Secure Boot is disabled** in the [bios](https://www.lifewire.com/how-to-enter-bios-2624481) of your machine. + +* Download the [Proxmox VE 7.x ISO Installer](https://www.proxmox.com/en/downloads/category/iso-images-pve). + +* You will now need to make a bootable USB drive using [balenaEtcher](https://www.balena.io/etcher/). Using a USB drive of at least **8gb**, insert it into your PC, open Etcher, select the Proxmox VE image you just downloaded, select your USB drive, then click Flash. + +* Insert the bootable USB drive you just made into the machine you wish to install Proxmox VE on. Connect a monitor, Ethernet cable, keyboard, mouse, and power on the machine. If the machine doesn't boot from the USB drive automatically, you will need to enter the boot options menu by pressing Esc, F2, F10 or F12, (This relies on the company of the computer or motherboard) on your keyboard immediately when the machine is powering on. + +* When you see the first screen, select Install Proxmox VE and press Enter. The installer will perform some automated tasks for 1-2 minutes. + +* On the EULA screen, select, I Agree. + +* On the Proxmox Virtualization Environment (PVE) screen, you will get the option to choose which disk you want to install Proxmox VE on. When finished, click Next. + +* On the Location and Time Zone selection, Type your country, then select your time zone and change the keyboard layout if needed. When finished, click Next + +* On the Administration password and E-mail address screen, choose a password (**make sure you don’t forget it**), confirm your password and enter a valid email address. When finished, click Next + +* On the Management network configuration screen. + * Management interface Should auto populate with the network interface (Ethernet) of your machine. If not, select the network interface. + * Hostname (FQDN) - The first part of the hostname is what your node will be called under Datacenter, you might want to change this to something more friendly now, the default is “pve” (eg. proxmox.lan). + * IP Address - Should auto populate. If the IP address looks odd here and not at all like the address range of your other devices, it’s possible you may not be connected to your network, so check your network cable and start again. + * Netmask - Should auto populate and be something like `255.255.255.0` depending on your network configuration. + * Gateway - Should auto populate to the IP address of your router. If not, make sure you're connected to your network + * DNS server - Should auto populate to the same IP address as your gateway. Or, input one of your choosing. When finished, click Next + +* Next on the Summary screen, confirm that all of the details are correct. When confirmed click Install. + +Proxmox VE will install and is finished once it displays its IP address on the screen. **Take note of the IP address!** It's needed to access Proxmox via a web browser. Remove the USB drive, and click Reboot. While the machine is rebooting, you can unplug the monitor, keyboard and mouse, as they're no longer needed. + +After 1-2 minutes, you should be able to access Proxmox VE via a web browser using the noted IP address from above (eg. `http://192.168.1.10:8006`) If you see a message "Warning: Potential Security Risk Ahead", you can safely ignore this, accept the risk and continue. Login with User name: `root` and the password you created on the Administration password and E-mail address screen. + +## Configuring and Updating Proxmox VE 7 + +Before installing Home Assistant OS, you will want to make sure that Proxmox VE has the latest updates and security patches installed. This has been made very simple with a [script](https://github.com/tteck/Proxmox/raw/main/misc/post-install-v3.sh). + +To run the Proxmox VE 7 Post Install script, copy and paste the following command in the Proxmox Shell. +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-install-v3.sh)" +``` +It's recommended to answer `y` to all questions. + +## Installing Home Assistant OS + +Installing Home Assistant OS using Proxmox VE has been made very simple with a [script](https://github.com/tteck/Proxmox/raw/main/vm/haos-vm-v3.sh). + +To run the Home Assistant OS VM install script, copy and paste the following command in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/haos-vm-v3.sh)" +``` +It's recommended to press [ENTER] to use the default settings. (Advanced settings are available for changing settings such as mac, bridge, vlan, ect...) It will then download the Official KVM Image from the Home Assistant github and configure it in Proxmox VE for you. This will take 2-20 minutes depending on your internet connection and machine. + +Once this has finished, you will see **✓ Completed Successfully!**. + +The Home Assistant OS VM will be assigned a different IP address than the one Proxmox VE is using. To find the IP address of the newly created Home Assistant OS VM, click on the VM (eg. haos8.2) then click Summary from the menu list, wait for Guest Agent to start. The IP address listed here is needed to access Home Assistant via a web browser using port 8123 (eg. `http://192.168.1.50:8123`). + +Once you can see the login screen, the setup has been completed and you can create a new account and password (or restore a backup). + +That’s it, you have now set up Home Assistant OS using Proxmox VE 7 + +This guide uses many resources from the famous "Installing Home Assistant OS using Proxmox 7" guide from @kanga_who + +The above scripts (and more) can be found at https://github.com/tteck/Proxmox From 2320ee8715beb99f5b73784338604eb483e548fd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Jun 2022 22:08:17 -0400 Subject: [PATCH 0008/1385] Delete file --- misc/set-up-haosvm-using-proxmox-7.md | 75 --------------------------- 1 file changed, 75 deletions(-) delete mode 100644 misc/set-up-haosvm-using-proxmox-7.md diff --git a/misc/set-up-haosvm-using-proxmox-7.md b/misc/set-up-haosvm-using-proxmox-7.md deleted file mode 100644 index 1ddab901..00000000 --- a/misc/set-up-haosvm-using-proxmox-7.md +++ /dev/null @@ -1,75 +0,0 @@ -# Set up a Home Assistant OS VM using Proxmox VE 7 (2022) - -This guide will help you set up a Home Assistant OS VM, on almost any x86/64 machine type you choose using Proxmox VE 7 as the operating system. -This guide also utilizes scripts to simplify the installation process, always remember to use due diligence when sourcing scripts and automation tasks from third-party sites. - -This installation uses an **Official KVM Image provided by the Home Assistant Team and is considered a supported installation method**. This method of installation is considered easy/medium difficulty and some knowledge of how to use and interact with Linux is suggested. - -If you have an existing Home Assistant installation and would like to know how to backup your current configuration to restore later, please see the documentation on [backing up and restoring your configuration](https://www.home-assistant.io/common-tasks/supervised/#making-a-backup-from-the-ui). - -## Installing Proxmox VE 7 - -* You will want to ensure **UEFI Boot & Virtualisation is enabled and Secure Boot is disabled** in the [bios](https://www.lifewire.com/how-to-enter-bios-2624481) of your machine. - -* Download the [Proxmox VE 7.x ISO Installer](https://www.proxmox.com/en/downloads/category/iso-images-pve). - -* You will now need to make a bootable USB drive using [balenaEtcher](https://www.balena.io/etcher/). Using a USB drive of at least **8gb**, insert it into your PC, open Etcher, select the Proxmox VE image you just downloaded, select your USB drive, then click Flash. - -* Insert the bootable USB drive you just made into the machine you wish to install Proxmox VE on. Connect a monitor, Ethernet cable, keyboard, mouse, and power on the machine. If the machine doesn't boot from the USB drive automatically, you will need to enter the boot options menu by pressing Esc, F2, F10 or F12, (This relies on the company of the computer or motherboard) on your keyboard immediately when the machine is powering on. - -* When you see the first screen, select Install Proxmox VE and press Enter. The installer will perform some automated tasks for 1-2 minutes. - -* On the EULA screen, select, I Agree. - -* On the Proxmox Virtualization Environment (PVE) screen, you will get the option to choose which disk you want to install Proxmox VE on. When finished, click Next. - -* On the Location and Time Zone selection, Type your country, then select your time zone and change the keyboard layout if needed. When finished, click Next - -* On the Administration password and E-mail address screen, choose a password (**make sure you don’t forget it**), confirm your password and enter a valid email address. When finished, click Next - -* On the Management network configuration screen. - * Management interface Should auto populate with the network interface (Ethernet) of your machine. If not, select the network interface. - * Hostname (FQDN) - The first part of the hostname is what your node will be called under Datacenter, you might want to change this to something more friendly now, the default is “pve” (eg. proxmox.lan). - * IP Address - Should auto populate. If the IP address looks odd here and not at all like the address range of your other devices, it’s possible you may not be connected to your network, so check your network cable and start again. - * Netmask - Should auto populate and be something like `255.255.255.0` depending on your network configuration. - * Gateway - Should auto populate to the IP address of your router. If not, make sure you're connected to your network - * DNS server - Should auto populate to the same IP address as your gateway. Or, input one of your choosing. When finished, click Next - -* Next on the Summary screen, confirm that all of the details are correct. When confirmed click Install. - -Proxmox VE will install and is finished once it displays its IP address on the screen. **Take note of the IP address!** It's needed to access Proxmox via a web browser. Remove the USB drive, and click Reboot. While the machine is rebooting, you can unplug the monitor, keyboard and mouse, as they're no longer needed. - -After 1-2 minutes, you should be able to access Proxmox VE via a web browser using the noted IP address from above (eg. `http://192.168.1.10:8006`) If you see a message "Warning: Potential Security Risk Ahead", you can safely ignore this, accept the risk and continue. Login with User name: `root` and the password you created on the Administration password and E-mail address screen. - -## Configuring and Updating Proxmox VE 7 - -Before installing Home Assistant OS, you will want to make sure that Proxmox VE has the latest updates and security patches installed. This has been made very simple with a [script](https://github.com/tteck/Proxmox/raw/main/misc/post-install-v3.sh). - -To run the Proxmox VE 7 Post Install script, copy and paste the following command in the Proxmox Shell. -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-install-v3.sh)" -``` -It's recommended to answer `y` to all questions. - -## Installing Home Assistant OS - -Installing Home Assistant OS using Proxmox VE has been made very simple with a [script](https://github.com/tteck/Proxmox/raw/main/vm/haos-vm-v3.sh). - -To run the Home Assistant OS VM install script, copy and paste the following command in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/haos-vm-v3.sh)" -``` -It's recommended to press [ENTER] to use the default settings. (Advanced settings are available for changing settings such as mac, bridge, vlan, ect...) It will then download the Official KVM Image from the Home Assistant github and configure it in Proxmox VE for you. This will take 2-20 minutes depending on your internet connection and machine. - -Once this has finished, you will see **✓ Completed Successfully!**. - -The Home Assistant OS VM will be assigned a different IP address than the one Proxmox VE is using. To find the IP address of the newly created Home Assistant OS VM, click on the VM (eg. haos8.2) then click Summary from the menu list, wait for Guest Agent to start. The IP address listed here is needed to access Home Assistant via a web browser using port 8123 (eg. `http://192.168.1.50:8123`). - -Once you can see the login screen, the setup has been completed and you can create a new account and password (or restore a backup). - -That’s it, you have now set up Home Assistant OS using Proxmox VE 7 - -This guide uses many resources from the famous "Installing Home Assistant OS using Proxmox 7" guide from @kanga_who - -The above scripts (and more) can be found at https://github.com/tteck/Proxmox From ef534db843bbcb154aa210a578b39bdaa63bc061 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Jun 2022 11:05:30 -0400 Subject: [PATCH 0009/1385] Update post-install-v3.sh --- misc/post-install-v3.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/misc/post-install-v3.sh b/misc/post-install-v3.sh index 19926093..54d0e44e 100644 --- a/misc/post-install-v3.sh +++ b/misc/post-install-v3.sh @@ -104,9 +104,14 @@ apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled Subscription Nag" fi -msg_info "Updating Proxmox" -sleep 2 -apt-get update -apt-get dist-upgrade -msg_ok "Finished" +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" +apt-get update &>/dev/null +apt-get -y dist-upgrade &>/dev/null +msg_ok "Updated Proxmox VE 7" +fi +sleep 2 +msg_ok "Finished Post Install Routines" From dc3ecbf4b0fb49b68df2233e8ccd82221b20dd87 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Jun 2022 22:20:51 -0400 Subject: [PATCH 0010/1385] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e3c422d8..e5b8be88 100644 --- a/README.md +++ b/README.md @@ -617,7 +617,11 @@ sudo systemctl status mariadb ``` Change the recorder: `db_url:` in your HA configuration.yaml -Example: `mysql://admin:password@192.168.100.26:3306/homeassistant?charset=utf8mb4` +Example: +``` +recorder: + db_url: mysql://admin:password@192.168.100.26:3306/homeassistant?charset=utf8mb4 +``` ⚙️ **To Update Mariadb:** From ca7c7f9d5adab2faa17ee74799f5c2107d304b0c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Jun 2022 22:22:19 -0400 Subject: [PATCH 0011/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e5b8be88..21a26235 100644 --- a/README.md +++ b/README.md @@ -618,7 +618,7 @@ 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 ``` From 5f7358ef621f02d2c15155fc55f6811e69a73047 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Jun 2022 22:44:36 -0400 Subject: [PATCH 0012/1385] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 21a26235..4671db9f 100644 --- a/README.md +++ b/README.md @@ -690,8 +690,11 @@ Then type exit to get back to root Change the recorder: `db_url:` in your HA configuration.yaml -Example: `db_url: postgresql://admin:your-password@192.168.100.20:5432/homeassistant?client_encoding=utf8` - +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 From 87d4da1e8d2e5a7b0bdb78d5d4b487d5fe9a67eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 Jun 2022 23:35:45 -0400 Subject: [PATCH 0013/1385] Update haos_vm.sh --- vm/haos_vm.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index ef59d398..7e3bb535 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -2,7 +2,7 @@ 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"` @@ -287,7 +287,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 container?\n\n" \ + "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 @@ -309,6 +309,7 @@ case $STORAGE_TYPE in btrfs|nfs|dir) DISK_EXT=".qcow2" DISK_REF="$VMID/" + DIR_IMPORT="-format qcow2" esac for i in {0,1}; do disk="DISK$i" @@ -321,12 +322,13 @@ 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 128 1>&/dev/null -qm importdisk $VMID ${FILE%.*} $STORAGE 1>&/dev/null +qm importdisk $VMID ${FILE%.*} $STORAGE ${DIR_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 + msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" if [ "$START_VM" == "yes" ]; then From 5a7ef1f712e65025e70351b89fd6ccffc1d131d5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 Jun 2022 23:57:00 -0400 Subject: [PATCH 0014/1385] allow storage type "dir" --- vm/haos-vm-v3.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index 9e0e26e1..7e3bb535 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -287,7 +287,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 container?\n\n" \ + "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 @@ -309,6 +309,7 @@ case $STORAGE_TYPE in btrfs|nfs|dir) DISK_EXT=".qcow2" DISK_REF="$VMID/" + DIR_IMPORT="-format qcow2" esac for i in {0,1}; do disk="DISK$i" @@ -321,12 +322,13 @@ 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 128 1>&/dev/null -qm importdisk $VMID ${FILE%.*} $STORAGE 1>&/dev/null +qm importdisk $VMID ${FILE%.*} $STORAGE ${DIR_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 + msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" if [ "$START_VM" == "yes" ]; then From 70510d745fd24cc0bf90b580be641e6d06c521c0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Jun 2022 14:31:31 -0400 Subject: [PATCH 0015/1385] Update zigbee2mqtt-install.sh --- setup/zigbee2mqtt-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index f1758c0c..2cb532c8 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -69,11 +69,11 @@ 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 +sudo apt-get install -y nodejs npm git make g++ gcc &>/dev/null msg_ok "Installed Node.js" msg_info "Setting up Zigbee2MQTT Repository" -sudo git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt &>/dev/null +sudo git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt &>/dev/null msg_ok "Set up Zigbee2MQTT Repository" msg_info "Installing Zigbee2MQTT" From 1e04867da284be5753c49fa2442e8246f687176f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Jun 2022 14:41:26 -0400 Subject: [PATCH 0016/1385] Update zigbee2mqtt-install.sh --- setup/zigbee2mqtt-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 2cb532c8..98fa1b7a 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -65,11 +65,11 @@ 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 +sudo curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - &>/dev/null msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" -sudo apt-get install -y nodejs npm git make g++ gcc &>/dev/null +apt-get install -y nodejs npm git make g++ gcc &>/dev/null msg_ok "Installed Node.js" msg_info "Setting up Zigbee2MQTT Repository" From f95ee7667d0b2777cd1629c959a482530aa9cd4f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Jun 2022 14:51:21 -0400 Subject: [PATCH 0017/1385] Update zigbee2mqtt-install.sh --- setup/zigbee2mqtt-install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 98fa1b7a..0e7f6ad6 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -62,14 +62,18 @@ 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" -sudo curl -sL https://deb.nodesource.com/setup_18.x | sudo -E 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" -apt-get install -y nodejs npm git make g++ gcc &>/dev/null +apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" msg_info "Setting up Zigbee2MQTT Repository" From c88e438b0d0f079cce50aa6c23ed98800679085f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Jun 2022 06:09:01 -0400 Subject: [PATCH 0018/1385] Create prometheus-install.sh --- setup/prometheus-install.sh | 122 ++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 setup/prometheus-install.sh diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh new file mode 100644 index 00000000..884e2deb --- /dev/null +++ b/setup/prometheus-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 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}..." +} + +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 "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); + 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 06ef335aa989386e0631f41b8974106bfbbdea40 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Jun 2022 06:10:51 -0400 Subject: [PATCH 0019/1385] Create prometheus-v3.sh --- ct/prometheus-v3.sh | 354 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 354 insertions(+) create mode 100644 ct/prometheus-v3.sh diff --git a/ct/prometheus-v3.sh b/ct/prometheus-v3.sh new file mode 100644 index 00000000..d2ec1ec6 --- /dev/null +++ b/ct/prometheus-v3.sh @@ -0,0 +1,354 @@ +#!/usr/bin/env bash +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 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}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +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} + _____ _____ ____ __ __ ______ _______ _ _ ______ _ _ _____ + | __ \| __ \ / __ \| \/ | ____|__ __| | | | ____| | | |/ ____| + | |__) | |__) | | | | \ / | |__ | | | |__| | |__ | | | | (___ + | ___/| _ /| | | | |\/| | __| 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}') + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9090${CL} \n" From fb4781cbb7159a6d16190520259663d3bca58ec4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Jun 2022 06:53:09 -0400 Subject: [PATCH 0020/1385] Update prometheus-install.sh --- setup/prometheus-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index 884e2deb..87338f49 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -118,5 +118,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/* +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 msg_ok "Cleaned" From 4e5753a8d2e5f4e12ebd5034efe87f80b9213f94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Jun 2022 07:18:04 -0400 Subject: [PATCH 0021/1385] Add files via upload --- misc/images/prome.png | Bin 0 -> 31467 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/prome.png diff --git a/misc/images/prome.png b/misc/images/prome.png new file mode 100644 index 0000000000000000000000000000000000000000..faf1eb89ad040eb16619bece5efae04b4d49e6be GIT binary patch literal 31467 zcmbTdbzD^6*EW2H25AB5Mx>MuK?X#+I~AluS~`XhM5Klk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=dsDT;G{~23M{&`({zLeYvI+B>(w=-4<)* z;do*o1@VwQg7van+ufhf6YW>9pPow*GKi2-qK6edo{IoHDa!&?TangnZEwhwm=vS zxH0&RA~AyjF@5q$r5h62*%XDYWtItsIl+~^J=8vhT``aWz#U)!>kaEFU7{4DHen|j8v+rjBh15{yt56?V1@pk{r> Date: Thu, 30 Jun 2022 07:22:39 -0400 Subject: [PATCH 0022/1385] Add files via upload --- misc/images/prome.png | Bin 31467 -> 16637 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/misc/images/prome.png b/misc/images/prome.png index faf1eb89ad040eb16619bece5efae04b4d49e6be..1ab45f27cd6a3ff31e5b2bc8fff6e40365a4f7d1 100644 GIT binary patch literal 16637 zcmXY3Wmp_dvqgeiaF^ij?(R;2#oZl(Tad-wB{%^R7Iy+0WN{1b0Tzcqf;+jJ_q#vl z*=J_Dr>jS*tIj#K@!Fb7Smjf0Ga3>;ijD#o)F5^NvMQ`yJ|4i0T8XjxL$3t*0 zpuNOg<{!98eBT#sgnjOM$bINm>l_cV8A|sny*dmq4ja&e>O%FwcpU+%w@=1DmBP17 z{XkZafx4I!Jqd0flJP?QzBKG@f;k#)T~EC&4yDK)A0iUwdw!r|7Mn%tnlo3h#Ig4@d@et+MxRbH70Bpk%N({!|Qn+i)KDUuz z87l?tQ(j+rgeaM--vzj@;$ErrQ|fabn77K0OSovktgz>|j~ zr|nD)`-u#M-$&es1HLy@WlNT2ja~Y2{WfO>a7WClPRmk%W*h%t$MKr`GrZ|=^sYPQ zId{=-8Dnafk0i+tD0TP4A(x_dezAO}W$4gJddqalAltNY73?H}}+Ov+wdWp}1K zYnLyC3=VY?Uwka+6p^FS2~55H9WB51;S#5t+!2#S7g{*y z_7~Cb_vW)V29M!Ad8;HUFfje)r87s4;?cjq+G8_tJpBNwnx*k6D_!FHid5yYG{0wf z+^h*G(6($Ga7G6uhUK!2s`i4*>wJ(CHb*dt6KA-~9k@v{`_X-WO*BOs`tAwrox4SQ zf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w8C(`Qp8TmQX{~Ok&m)>+0JVCU2S5t=-z>9PnFPP^NC6mdTuDcs*JeS=dsDT;G{~23M{&`({zLeYvI+B>(w=-4<)* z;do*o1@VwQg7van+ufhf6YW>9pPow*GKi2-qK6edo{IoHDa!&?TangnZEwhwm=vS zxH0&RA~AyjF@5q$r5h62*%XDYWtItsIl+~^J=8vhT``aWz#U)!>kaEFU7{4DHen|j8v+rjBh15{yt56?V1@pk{r> Date: Thu, 30 Jun 2022 07:29:36 -0400 Subject: [PATCH 0024/1385] Add files via upload --- misc/images/prome.png | Bin 16637 -> 44686 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/misc/images/prome.png b/misc/images/prome.png index 1ab45f27cd6a3ff31e5b2bc8fff6e40365a4f7d1..0f6f3de4d29d5d914b93c7690ec229feb4f84f28 100644 GIT binary patch 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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(+) diff --git a/README.md b/README.md index 4671db9f..86222c4a 100644 --- a/README.md +++ b/README.md @@ -880,6 +880,35 @@ ________________________________________________________________________________ +
+ 🔸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-v3.sh)" +``` + +

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

+ +**Prometheus Interface - IP:9090** + +⚙️ **To Update Prometheus** + +```yaml +Working On +``` + +____________________________________________________________________________________________ + +
+
InfluxDB/Telegraf LXC From a5b4f0a503c825491dc2cd37bb2903fbd79b113b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Jun 2022 07:33:31 -0400 Subject: [PATCH 0026/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86222c4a..f51e82a3 100644 --- a/README.md +++ b/README.md @@ -895,7 +895,7 @@ To create a new Proxmox Prometheus LXC, run the following in the Proxmox Shell. bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/prometheus-v3.sh)" ``` -

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

+

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

**Prometheus Interface - IP:9090** From 23c326e375fdb4afc4e75d72ddf810ddb6b63629 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Jun 2022 07:36:58 -0400 Subject: [PATCH 0027/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 0f87091b..c7122851 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-06-30 + +### Changed + +- **Prometheus LXC** + - NEW Script ## 2022-06-06 From c5a53709e282e6d5b9b2efb150658b4802905b59 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Jun 2022 07:59:20 -0400 Subject: [PATCH 0028/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f51e82a3..4b4ff076 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

Proxmox VE 7 Post Install

-This script will give options to Disable the Enterprise Repo, Add/Correct PVE7 Sources, Enable the No-Subscription Repo, Add Test Repo and Disable Subscription Nag. +This 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. Run the following in the Proxmox Shell. ⚠️ **PVE7 ONLY** From b8650fa1c481367d1196137d21c9e401c9383395 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Jun 2022 08:54:15 -0400 Subject: [PATCH 0029/1385] Update nginx-proxy-manager-install.sh --- setup/nginx-proxy-manager-install.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index 6dc047b5..686a4b60 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -61,12 +61,13 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" apt-get update &>/dev/null -apt-get -qqy install \ +apt-get -y install \ sudo \ curl \ - wget \ gnupg \ - openssl \ + make \ + g++ \ + gcc \ ca-certificates \ apache2-utils \ logrotate \ @@ -76,7 +77,7 @@ apt-get -qqy install \ lsb-release &>/dev/null msg_ok "Installed Dependencies" -msg_info "Installing 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 @@ -85,7 +86,7 @@ msg_info "Installing Dependencies" 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 Dependencies" +msg_ok "Installed Python" msg_info "Installing Openresty" wget -q -O - https://openresty.org/package/pubkey.gpg | apt-key add - &>/dev/null @@ -96,11 +97,11 @@ apt-get -y install --no-install-recommends openresty &>/dev/null msg_ok "Installed Openresty" msg_info "Setting up Node.js Repository" -sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo -E 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" -sudo apt-get install -y nodejs git make g++ gcc &>/dev/null +apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" msg_info "Installing Yarn" From f6037d414c214d49f6cd3e66fd695e3dcacd02dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Jul 2022 07:25:41 -0400 Subject: [PATCH 0030/1385] set efitype & change size --- vm/haos-vm-v3.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index 7e3bb535..f28207ae 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -321,10 +321,10 @@ msg_ok "Extracted 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 128 1>&/dev/null +pvesm alloc $STORAGE $VMID $DISK0 528 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DIR_IMPORT:-} 1>&/dev/null qm set $VMID \ - -efidisk0 ${DISK0_REF},size=128K \ + -efidisk0 ${DISK0_REF},efitype=4m,size=528K \ -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null From bf987d5bff1a3180fbfec44e0f6a6ed261550d5f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Jul 2022 07:56:06 -0400 Subject: [PATCH 0031/1385] increase efi disk size --- vm/haos-vm-v3.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index f28207ae..2e52013d 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -321,10 +321,10 @@ msg_ok "Extracted 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 528 1>&/dev/null +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DIR_IMPORT:-} 1>&/dev/null qm set $VMID \ - -efidisk0 ${DISK0_REF},efitype=4m,size=528K \ + -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null From 1d9a6860491d6a7f2e7611ecb1be960cfae644a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Jul 2022 08:49:10 -0400 Subject: [PATCH 0032/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index c7122851..2c8aca7a 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-07-01 + +### Changed + +- **Home Assistant OS VM** + - Fixed to use different storage types. + ## 2022-06-30 ### Changed From aa17af8c0d28049121b1f40cf905903a17e22198 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Jul 2022 09:02:42 -0400 Subject: [PATCH 0033/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 2c8aca7a..f7f5d821 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** - - Fixed to use different storage types. + - Allow different storage types. ## 2022-06-30 From 6159b54915271109cd7bbcf802e06499af8c6226 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Jul 2022 10:48:52 -0400 Subject: [PATCH 0034/1385] 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 2e52013d..6101326d 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -293,7 +293,7 @@ else done fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." -msg_ok "Container ID is ${CL}${BL}$VMID${CL}." +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 msg_ok "Found URL for Home Assistant ${BRANCH} Disk Image" From 9bf7129ac8be01f93e41573999539a11190a44d3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Jul 2022 12:59:51 -0400 Subject: [PATCH 0035/1385] Update haos-vm-v3.sh --- vm/haos-vm-v3.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index 6101326d..28ba8c28 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -296,13 +296,13 @@ 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 -msg_ok "Found URL for Home Assistant ${BRANCH} Disk Image" +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}${BRANCH}.qcow2${CL}${GN} Disk Image" -msg_info "Extracting Disk Image" +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 @@ -316,7 +316,7 @@ 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 Disk Image" +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 \ From 1f347f9ed128ff7f795db600b16f9daa34133045 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Jul 2022 13:36:31 -0400 Subject: [PATCH 0036/1385] Create add-tailscale-lxc.sh --- misc/add-tailscale-lxc.sh | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 misc/add-tailscale-lxc.sh diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh new file mode 100644 index 00000000..6ef0aea5 --- /dev/null +++ b/misc/add-tailscale-lxc.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +echo -e "\e[1;33m This 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 +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 + +CTID=$1 +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 + +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/add-tailscale-install.sh)" || exit + +msg "\e[1;33m Finished....Reboot ${CTID} LXC to apply the changes \e[0m" From e360a7f4bf77fe66adccc35431d8e8a7b2aef374 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Jul 2022 13:37:58 -0400 Subject: [PATCH 0037/1385] Create add-tailscale-install.sh --- misc/add-tailscale-install.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 misc/add-tailscale-install.sh diff --git a/misc/add-tailscale-install.sh b/misc/add-tailscale-install.sh new file mode 100644 index 00000000..a9f4b0da --- /dev/null +++ b/misc/add-tailscale-install.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +echo -e "Installing Tailscale..." +curl -fsSL https://tailscale.com/install.sh | sh &>/dev/null +echo -e "Installed Tailscale" From f3d29a78be19761688a037008edc713b53ecb10d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Jul 2022 14:21:12 -0400 Subject: [PATCH 0038/1385] Update README.md --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 4b4ff076..ad4a7c02 100644 --- a/README.md +++ b/README.md @@ -1673,6 +1673,34 @@ apt update && apt upgrade -y ``` ____________________________________________________________________________________________ +
+
+ 🔸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 +``` + +___________________________________________________________________________________________ +
From 480d1f68eac3aef2f73e6e3f1128a36bece39097 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Jul 2022 14:22:37 -0400 Subject: [PATCH 0039/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f7f5d821..1bdb668f 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-07-03 + +### Changed + +- **Tailscale** + - NEW Script + ## 2022-07-01 ### Changed From d034f97612ea5ee77e03341ea7910f0119dbd9f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Jul 2022 16:27:49 -0400 Subject: [PATCH 0040/1385] Update add-tailscale-lxc.sh --- 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 6ef0aea5..766a3861 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -45,5 +45,5 @@ lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file EOF lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/add-tailscale-install.sh)" || exit - +# lxc-attach -n $CTID -- bash -c "$(curl -fsSL https://tailscale.com/install.sh)" || exit msg "\e[1;33m Finished....Reboot ${CTID} LXC to apply the changes \e[0m" From 29283581e454a43b1d2452be3dfe34a223e3977d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Jul 2022 19:35:48 -0400 Subject: [PATCH 0041/1385] Update add-tailscale-lxc.sh --- 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 766a3861..72d2993e 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -45,5 +45,5 @@ lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file EOF lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/add-tailscale-install.sh)" || exit -# lxc-attach -n $CTID -- bash -c "$(curl -fsSL https://tailscale.com/install.sh)" || exit +# lxc-attach -n $CTID -- bash -c "$(curl -fsSL https://tailscale.com/install.sh)" &>/dev/null || exit msg "\e[1;33m Finished....Reboot ${CTID} LXC to apply the changes \e[0m" From 42bf5b2ba531e48d6e2fb0d480dfaec2ed0571fc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Jul 2022 19:53:08 -0400 Subject: [PATCH 0042/1385] Update add-tailscale-lxc.sh --- misc/add-tailscale-lxc.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 72d2993e..fd5aca7e 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -44,6 +44,9 @@ lxc.cgroup2.devices.allow: c 10:200 rwm lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file EOF -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/add-tailscale-install.sh)" || exit -# lxc-attach -n $CTID -- bash -c "$(curl -fsSL https://tailscale.com/install.sh)" &>/dev/null || exit -msg "\e[1;33m Finished....Reboot ${CTID} LXC to apply the changes \e[0m" +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" +msg "Reboot ${CTID} LXC to apply the changes, then run tailscale up in the LXC console" From 2787814273df0eaf85ba4481446501a3b98af635 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Jul 2022 19:55:55 -0400 Subject: [PATCH 0043/1385] Delete add-tailscale-install.sh --- misc/add-tailscale-install.sh | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 misc/add-tailscale-install.sh diff --git a/misc/add-tailscale-install.sh b/misc/add-tailscale-install.sh deleted file mode 100644 index a9f4b0da..00000000 --- a/misc/add-tailscale-install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -echo -e "Installing Tailscale..." -curl -fsSL https://tailscale.com/install.sh | sh &>/dev/null -echo -e "Installed Tailscale" From 02c2188ca416f2fb62d839d439a25af3836fc20e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Jul 2022 19:56:54 -0400 Subject: [PATCH 0044/1385] Update add-tailscale-lxc.sh --- 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 fd5aca7e..6b369ef7 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -49,4 +49,4 @@ lxc-attach -n $CTID -- bash -c "$(curl -fsSL https://tailscale.com/install.sh)" msg "⌛ Installed Tailscale" sleep 2 msg "\e[1;32m ✔ Completed Successfully!\e[0m" -msg "Reboot ${CTID} LXC to apply the changes, then run tailscale up in the LXC console" +msg "\e[1;31m Reboot ${CTID} LXC to apply the changes, then run tailscale up in the LXC console\e[0m" From 9fc2363af70274246fc4ed7e297a8ba53384ff95 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 4 Jul 2022 07:33:54 -0400 Subject: [PATCH 0045/1385] Update add-tailscale-lxc.sh --- misc/add-tailscale-lxc.sh | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 6b369ef7..ba0e37a2 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -echo -e "\e[1;33m This script will add Tailscale to an existing LXC Container ONLY\e[0m" +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 @@ -16,26 +16,19 @@ 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" + 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 } 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 CTID=$1 CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf From 995346d2fc42f8b19683286a2bb34d0ce6d96b94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 4 Jul 2022 10:48:42 -0400 Subject: [PATCH 0046/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1bdb668f..49df748e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -15,7 +15,7 @@ All notable changes to this project will be documented in this file. ### Changed - **Home Assistant OS VM** - - Allow different storage types. + - Allow different storage types (lvmthin, nfs, dir). ## 2022-06-30 From f67afef4a62bfcfab872e1427300a75ef0824db4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 5 Jul 2022 11:26:39 -0400 Subject: [PATCH 0047/1385] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ad4a7c02..9908107f 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,8 @@ ________________________________________________________________________________

Home Assistant OS VM

Option to create VM using the Latest or Stable 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) installs of any kind. + To create a new Proxmox Home Assistant OS VM, run the following in the Proxmox Shell ```yaml From 3e411c1ee5ea0fc9ea1390545d0b59519eb88205 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 5 Jul 2022 14:33:59 -0400 Subject: [PATCH 0048/1385] Update haos_vm.sh --- vm/haos_vm.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index 7e3bb535..a5621c76 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -2,7 +2,7 @@ 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="7.6" YW=`echo "\033[33m"` BL=`echo "\033[36m"` RD=`echo "\033[01;31m"` @@ -293,16 +293,16 @@ else done fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." -msg_ok "Container ID is ${CL}${BL}$VMID${CL}." +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 -msg_ok "Found URL for Home Assistant ${BRANCH} Disk Image" +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}${BRANCH}.qcow2${CL}${GN} Disk Image" -msg_info "Extracting Disk Image" +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 @@ -316,15 +316,15 @@ 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 Disk Image" +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 128 1>&/dev/null +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DIR_IMPORT:-} 1>&/dev/null qm set $VMID \ - -efidisk0 ${DISK0_REF},size=128K \ + -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null From 0ce856f9b6c6162c1bdf4fef5e2a6dc4d7ee7709 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Jul 2022 15:16:18 -0400 Subject: [PATCH 0049/1385] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9908107f..9052ae54 100644 --- a/README.md +++ b/README.md @@ -1215,6 +1215,8 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/jellyfin-v3. **Jellyfin Media Server Interface - IP:8096** +FFmpeg path: `/usr/lib/jellyfin-ffmpeg/ffmpeg` + ⚙️ **To Update Jellyfin Media Server** Run in the LXC console From b393592578e1fcac759b47d9e15f37e45a88975a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Jul 2022 19:14:27 -0400 Subject: [PATCH 0050/1385] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9052ae54..e6cfe1aa 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

Proxmox VE 7 Post Install

-This 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 and Update Proxmox VE. Run the following in the Proxmox Shell. ⚠️ **PVE7 ONLY** @@ -883,7 +883,7 @@ ________________________________________________________________________________
- 🔸Prometheus LXC + Prometheus LXC

From a34c32f167ac30d87e50beb16313bcb56a14c9b7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 7 Jul 2022 04:48:48 -0400 Subject: [PATCH 0051/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e6cfe1aa..4f0b20f6 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Run the following in the Proxmox Shell. ⚠️ **PVE7 ONLY** bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-install-v3.sh)" ``` -It's recommended to update Proxmox after running this script, before adding any VM/CT. +It's recommended to answer `y` to all options. ____________________________________________________________________________________________ From 07ff06d06ecb70fecabac83a1ca725bcf14602d9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 7 Jul 2022 12:31:24 -0400 Subject: [PATCH 0052/1385] 8.3 --- 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 28ba8c28..9f5f0a66 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -2,7 +2,7 @@ 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="8.3" YW=`echo "\033[33m"` BL=`echo "\033[36m"` RD=`echo "\033[01;31m"` From 14dbb4704bb5d6618257eb927b12aba1c39ba3b2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Jul 2022 12:38:39 -0400 Subject: [PATCH 0053/1385] Create openhab-install.sh --- setup/openhab-install.sh | 110 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 setup/openhab-install.sh diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh new file mode 100644 index 00000000..25e9f9ab --- /dev/null +++ b/setup/openhab-install.sh @@ -0,0 +1,110 @@ +#!/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 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}..." +} + +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 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); + 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 96d2c106a29911e971e680c3bb9c5f9764ffcd3d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Jul 2022 12:40:00 -0400 Subject: [PATCH 0054/1385] Create openhab-v3.sh --- ct/openhab-v3.sh | 356 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 356 insertions(+) create mode 100644 ct/openhab-v3.sh diff --git a/ct/openhab-v3.sh b/ct/openhab-v3.sh new file mode 100644 index 00000000..78312e12 --- /dev/null +++ b/ct/openhab-v3.sh @@ -0,0 +1,356 @@ +#!/usr/bin/env bash +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 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}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +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} + _ _ ____ + | | | | /\ | _ \ + ___ _ __ ___ _ __ | |__| | / \ | |_) | + / _ \| _ \ / _ \ _ \| __ | / /\ \ | _ < + | (_) | |_) | __/ | | | | | |/ ____ \| |_) | + \___/| .__/ \___|_| |_|_| |_/_/ 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}') + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL}\n" From 4daf200902d7458078508f1865b2427d6e00996d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Jul 2022 12:53:50 -0400 Subject: [PATCH 0055/1385] Update README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 4f0b20f6..1e074b28 100644 --- a/README.md +++ b/README.md @@ -294,6 +294,35 @@ ________________________________________________________________________________
+
+ 🔸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-v3.sh)" +``` + +

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

+ +**openHAB Interface - IP:8080** + +⚙️ **To Update openHAB** + +```yaml +apt update && apt upgrade -y +``` + +____________________________________________________________________________________________ + +
+
Homebridge LXC From 8557dcb05bd9bff049868fa51f96c2554cedb022 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Jul 2022 12:54:55 -0400 Subject: [PATCH 0056/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 49df748e..157d5f10 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-07-08 + +### Changed + +- **openHAB LXC** + - NEW Script + ## 2022-07-03 ### Changed From 98990a196b2718f49cb4961bf01cff8f82f412dc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Jul 2022 10:30:54 -0400 Subject: [PATCH 0057/1385] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e074b28..0d3b774a 100644 --- a/README.md +++ b/README.md @@ -1025,7 +1025,7 @@ ________________________________________________________________________________

Docker LXC

-

Options to Install Portainer and/or Docker Compose

+

Options to Install Portainer and/or Docker Compose V2

To create a new Proxmox Docker LXC, run the following in the Proxmox Shell. @@ -1035,6 +1035,8 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker-v3.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** From 6bce073f90816b9fac552912539cdd8c9527975f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Jul 2022 10:31:28 -0400 Subject: [PATCH 0058/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d3b774a..c844a3a9 100644 --- a/README.md +++ b/README.md @@ -1710,7 +1710,7 @@ ________________________________________________________________________________
- 🔸Tailscale + Tailscale

From 3dd3521d907eb3a1e6c0f6b4f6e5a963ff10fbab Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Jul 2022 10:48:09 -0400 Subject: [PATCH 0059/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c844a3a9..0f59fe70 100644 --- a/README.md +++ b/README.md @@ -1035,7 +1035,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker-v3.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.** +**⚠ You run Compose V2 by replacing the hyphen (-) with a space, using docker compose, instead of docker-compose.** **Portainer Interface - IP:9000** From 680e537e1b7812dd75c3cb73c64e3f61f8285a8f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Jul 2022 10:49:28 -0400 Subject: [PATCH 0060/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f59fe70..c844a3a9 100644 --- a/README.md +++ b/README.md @@ -1035,7 +1035,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker-v3.sh

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

-**⚠ You run Compose V2 by replacing the hyphen (-) with a space, using docker compose, instead of docker-compose.** +**⚠ Run Compose V2 by replacing the hyphen (-) with a space, using docker compose, instead of docker-compose.** **Portainer Interface - IP:9000** From 4dd4a926ab1de57f2897cd59bbc02b9c46edbe6e Mon Sep 17 00:00:00 2001 From: schiz0phr3ne <22858496+schiz0phr3ne@users.noreply.github.com> Date: Sun, 10 Jul 2022 17:51:12 +0200 Subject: [PATCH 0061/1385] Delete tarball after update --- misc/vaultwarden-update.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/vaultwarden-update.sh b/misc/vaultwarden-update.sh index 3f918c61..1a5e7a7d 100644 --- a/misc/vaultwarden-update.sh +++ b/misc/vaultwarden-update.sh @@ -42,6 +42,9 @@ 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 From 22601ffed1eb1be6bf4314607b3018d80ed1e49e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Jul 2022 16:53:35 -0400 Subject: [PATCH 0062/1385] Update README.md --- README.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c844a3a9..71a2df08 100644 --- a/README.md +++ b/README.md @@ -329,7 +329,8 @@ ________________________________________________________________________________

Homebridge LXC

-Homebridge allows you to integrate with smart home devices that do not natively support HomeKit + +[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. @@ -386,6 +387,8 @@ Update from the Homebridge UI

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 @@ -417,6 +420,8 @@ ________________________________________________________________________________

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 @@ -464,9 +469,10 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/npm_update

-

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 @@ -517,6 +523,7 @@ ________________________________________________________________________________

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. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click. To create a new Proxmox Node-RED LXC, run the following in the Proxmox Shell. @@ -560,6 +567,8 @@ ________________________________________________________________________________

Mariadb LXC

+[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 @@ -675,6 +684,8 @@ ________________________________________________________________________________

PostgreSQL LXC

+[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 @@ -748,6 +759,8 @@ ________________________________________________________________________________

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 @@ -828,6 +841,8 @@ ________________________________________________________________________________

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 @@ -855,6 +870,8 @@ ________________________________________________________________________________

Zwavejs2MQTT LXC

+[Zwavejs2MQTT](https://zwave-js.github.io/zwavejs2mqtt/#/) 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. ```yaml @@ -888,7 +905,7 @@ ________________________________________________________________________________

NocoDB LXC

-NocoDB is an open source #NoCode platform that turns any database into a smart spreadsheet. Airtable Alternative. +[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. From 832c73afb6a2cdf0fc2c0c2383e3f7665eb457f0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Jul 2022 17:03:50 -0400 Subject: [PATCH 0063/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 71a2df08..0169721c 100644 --- a/README.md +++ b/README.md @@ -523,7 +523,7 @@ ________________________________________________________________________________

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. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click. +[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. From 12c79ae15edf21a36eb5e970b5d9cbaea383bc10 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 07:23:26 -0400 Subject: [PATCH 0064/1385] Update pihole-v3.sh --- ct/pihole-v3.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ct/pihole-v3.sh b/ct/pihole-v3.sh index 3e513be3..493d45b4 100644 --- a/ct/pihole-v3.sh +++ b/ct/pihole-v3.sh @@ -77,8 +77,8 @@ 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 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}" @@ -105,14 +105,14 @@ 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})" + echo -e "${YW}Type Unprivileged, or Press [ENTER] for Default: Privileged" read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; + 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}" + CT_TYPE1="Unprivileged" + CT_TYPE="1" + echo -en "${DGN}Set CT Type ${BL}Unprivileged${CL}" fi; echo -e " ${CM}${CL} \r" sleep 1 @@ -348,4 +348,4 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 msg_ok "Completed Successfully!\n" echo -e "${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" + ${BL}http://${IP}/admin${CL} \n" From 0beb7da32829bd7aa4816c45209f84831f92370d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 07:24:44 -0400 Subject: [PATCH 0065/1385] Update pihole-install.sh --- setup/pihole-install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index e2ccbb03..0e9b413d 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -55,17 +55,20 @@ 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 dist-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" -curl -sSL https://install.pi-hole.net | bash +wget -O tteck-install.sh https://install.pi-hole.net &>/dev/null +bash tteck-install.sh msg_ok "Installed Pi-hole" PASS=$(grep -w "root" /etc/shadow | cut -b6); @@ -89,5 +92,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/* +rm -rf /var/{cache,log}/* /var/lib/apt/lists/* /root/tteck-install.sh msg_ok "Cleaned" From fcff2c90dc49902442d216e38efa352f16a6de99 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 07:38:35 -0400 Subject: [PATCH 0066/1385] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0169721c..307a003f 100644 --- a/README.md +++ b/README.md @@ -1282,6 +1282,8 @@ ________________________________________________________________________________

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 From 94256429357a2dbe8b2ec11ef161f8c9b3df4dc6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 11:53:50 -0400 Subject: [PATCH 0067/1385] Update post-install-v3.sh --- misc/post-install-v3.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/misc/post-install-v3.sh b/misc/post-install-v3.sh index 54d0e44e..effa399d 100644 --- a/misc/post-install-v3.sh +++ b/misc/post-install-v3.sh @@ -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" From 29ba6893099273b4e9b6fa84498b77614a10bc1f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 13:52:05 -0400 Subject: [PATCH 0068/1385] Update haos_vm.sh attempt zfspool|btrfs --- vm/haos_vm.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index a5621c76..9d6271b9 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -2,7 +2,7 @@ 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="7.6" +STABLE="8.3" YW=`echo "\033[33m"` BL=`echo "\033[36m"` RD=`echo "\033[01;31m"` @@ -306,10 +306,19 @@ msg_info "Extracting KVM Disk Image" unxz $FILE STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') case $STORAGE_TYPE in - btrfs|nfs|dir) - DISK_EXT=".qcow2" - DISK_REF="$VMID/" - DIR_IMPORT="-format qcow2" + nfs|dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + ;; + + zfspool|btrfs) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_FORMAT="subvol" + DISK_IMPORT="-format subvol" + ;; + esac for i in {0,1}; do disk="DISK$i" @@ -321,8 +330,8 @@ 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 -qm importdisk $VMID ${FILE%.*} $STORAGE ${DIR_IMPORT:-} 1>&/dev/null +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null #--format ${DISK_FORMAT:-qcow2} +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 From 315218abc03dd8e350b50f2359ce7f8c583dd4e6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 16:32:25 -0400 Subject: [PATCH 0069/1385] Update haos_vm.sh another attempt at BTRFS --- 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 9d6271b9..b4eb76cd 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -313,10 +313,10 @@ case $STORAGE_TYPE in ;; zfspool|btrfs) - DISK_EXT=".qcow2" + DISK_EXT=".raw" DISK_REF="$VMID/" DISK_FORMAT="subvol" - DISK_IMPORT="-format subvol" + DISK_IMPORT="-format raw" ;; esac @@ -330,7 +330,7 @@ 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 #--format ${DISK_FORMAT:-qcow2} +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 \ From bc24e5c14b3c70459a14d8979d11178b6ad9c8f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 17:48:20 -0400 Subject: [PATCH 0070/1385] 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 b4eb76cd..a25de7fa 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -312,7 +312,7 @@ case $STORAGE_TYPE in DISK_IMPORT="-format qcow2" ;; - zfspool|btrfs) + btrfs) DISK_EXT=".raw" DISK_REF="$VMID/" DISK_FORMAT="subvol" From aa8f509588356ae9928ad380a8715f69a61acb42 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 18:03:56 -0400 Subject: [PATCH 0071/1385] add BTRFS storage type --- vm/haos-vm-v3.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index 9f5f0a66..a25de7fa 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -306,10 +306,19 @@ msg_info "Extracting KVM Disk Image" unxz $FILE STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') case $STORAGE_TYPE in - btrfs|nfs|dir) - DISK_EXT=".qcow2" - DISK_REF="$VMID/" - DIR_IMPORT="-format qcow2" + 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" @@ -322,7 +331,7 @@ 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 -qm importdisk $VMID ${FILE%.*} $STORAGE ${DIR_IMPORT:-} 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 From eee6f9817eb2153ba856886d7a1b8134b7960696 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 18:23:38 -0400 Subject: [PATCH 0072/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 307a003f..cf2c12e0 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ ________________________________________________________________________________

Home Assistant OS VM

Option to create VM using the Latest or Stable 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) installs of any kind. +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) 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 From b42da4bfb56f378dd0a15ebb04ef797b386013bc Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 18:33:14 -0400 Subject: [PATCH 0073/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf2c12e0..9c0177b1 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ ________________________________________________________________________________

Home Assistant OS VM

Option to create VM using the Latest or Stable 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) installs of any kind. Supports lvmthin, zfspool, nfs, dir and btrfs storage types. +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 From b63f732e354d1bb1d9ac32657cb5faefa08cf875 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 18:36:55 -0400 Subject: [PATCH 0074/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c0177b1..e327ff4b 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ ________________________________________________________________________________
- Home Assistant OS VM + 🔸Home Assistant OS VM

From dc4da55fc366187b40153bcf1bf2e15473f4e16b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Jul 2022 18:38:30 -0400 Subject: [PATCH 0075/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 157d5f10..ec3d06c4 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-07-11 + +### Changed + +- **Home Assistant OS VM** + - Supports lvmthin, zfspool, nfs, dir and btrfs storage types. + ## 2022-07-08 ### Changed From 24d0e9792ed175937ea01be281d0d3553538933b Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Jul 2022 16:14:04 -0400 Subject: [PATCH 0076/1385] Update README.md --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e327ff4b..656d2bcc 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,9 @@ ________________________________________________________________________________ @home-assistantGitHub - portainer/portainer-docs: Portainer documentation

Home Assistant Container LXC

- + +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 @@ -202,9 +204,11 @@ ________________________________________________________________________________ @home-assistant

Podman Home Assistant Container LXC

-To create a new Proxmox Podman Home Assistant Container LXC, run the following in the Proxmox Shell. +A standalone container-based installation of Home Assistant Core - ([What is Podman?](https://youtu.be/lkg5QJsoCCQ)) ⚠️ Podman seems to need a privileged LXC +⚠️ 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-v3.sh)" @@ -964,6 +968,10 @@ ________________________________________________________________________________

InfluxDB/Telegraf LXC

+[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 @@ -1004,6 +1012,8 @@ ________________________________________________________________________________

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 @@ -1044,6 +1054,8 @@ ________________________________________________________________________________

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 From 35abefca0a1a9b57d96782fba8e9a2fb7338d5fc Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Jul 2022 17:33:36 -0400 Subject: [PATCH 0077/1385] Update webmin.sh --- misc/webmin.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/webmin.sh b/misc/webmin.sh index 6c77b12e..ec413018 100644 --- a/misc/webmin.sh +++ b/misc/webmin.sh @@ -22,11 +22,11 @@ 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.990_all.deb &>/dev/null +wget http://prdownloads.sourceforge.net/webadmin/webmin_1.996_all.deb &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Installing Webmin... " -dpkg --install webmin_1.990_all.deb &>/dev/null +dpkg --install webmin_1.996_all.deb &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Setting Default Webmin usermame & password to root... " From 65449f97e65bd85ddacd7026ec48ad7ee491d221 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Jul 2022 17:50:42 -0400 Subject: [PATCH 0078/1385] Update webmin.sh --- misc/webmin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/webmin.sh b/misc/webmin.sh index ec413018..080b5611 100644 --- a/misc/webmin.sh +++ b/misc/webmin.sh @@ -31,7 +31,7 @@ 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.990_all.deb +rm -rf /root/webmin_1.996_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}" From 7cffd6f57bd28622deafc02d368fb17f7b379fe5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 11:38:10 -0400 Subject: [PATCH 0079/1385] Create edge-kernel.sh --- misc/edge-kernel.sh | 126 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 misc/edge-kernel.sh diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh new file mode 100644 index 00000000..c745475c --- /dev/null +++ b/misc/edge-kernel.sh @@ -0,0 +1,126 @@ +#!/usr/bin/env bash +# 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) +clear +while true; do + read -p "THIS IS A PROXMOX EDGE KERNEL TOOL, USE AT YOUR OWN RISK. +THE INFORMATION AND CONTENT MADE AVAILABLE TO YOU ON THE SITE IS PROVIDED 'AS IS' AND 'AS AVAILABLE.' +WE MAKE NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED. Proceed(y/n)?" yn + case $yn in + [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"` + 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} 2)${normal} Switch to Proxmox PVE ${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} Remove Proxmox Edge Kernel & Reboot\n" + printf "${menu}*********************************************${normal}\n" + 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"` + 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) while true; do + read -p "Are you sure you want to Install Proxmox 5.18 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 5.18 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 + reboot + break; + ;; + 2) while true; do + read -p "Are you sure you want to Switch to Proxmox PVE ${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 PVE 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 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 + fi + done + +show_menu From f18e5145f2082a0e6a6979563ecd747134c92cc1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 11:44:31 -0400 Subject: [PATCH 0080/1385] Update edge-kernel.sh --- misc/edge-kernel.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index c745475c..e4c25cb3 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -6,9 +6,7 @@ PVE_KERNEL=$(dpkg --list| grep 'kernel-.*-pve' | awk '{print substr($2, 12, leng 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. -THE INFORMATION AND CONTENT MADE AVAILABLE TO YOU ON THE SITE IS PROVIDED 'AS IS' AND 'AS AVAILABLE.' -WE MAKE NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED. Proceed(y/n)?" yn + 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;; From efc65a2a7e7ac06139f39d51c54866ea88370628 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 11:45:24 -0400 Subject: [PATCH 0081/1385] Update kernel-clean-v3.sh --- misc/kernel-clean-v3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/kernel-clean-v3.sh b/misc/kernel-clean-v3.sh index f2ba9c41..332cc7d8 100644 --- a/misc/kernel-clean-v3.sh +++ b/misc/kernel-clean-v3.sh @@ -17,7 +17,7 @@ current_kernel=$(uname -r) pve=$(pveversion) while true; do - read -p "This will Clean Unused Kernel Images. Proceed(y/n)?" yn + read -p "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; From 09cff9fcdab6be9893ab84a2e844af85feb69162 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 11:47:40 -0400 Subject: [PATCH 0082/1385] Update edge-kernel.sh --- 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 e4c25cb3..fff7310b 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -6,7 +6,7 @@ PVE_KERNEL=$(dpkg --list| grep 'kernel-.*-pve' | awk '{print substr($2, 12, leng 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 + 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;; From f85a4638f622d9ff3590654e6cb7d06e43b5a02f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 12:07:52 -0400 Subject: [PATCH 0083/1385] Update edge-kernel.sh --- misc/edge-kernel.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index fff7310b..4df61649 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -28,7 +28,8 @@ show_menu(){ printf "${menu}**${number} 1)${normal} Install Proxmox 5.18 Edge Kernel & Reboot\n" printf "${menu}**${number} 2)${normal} Switch to Proxmox PVE ${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} Remove Proxmox Edge 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}*********************************************${normal}\n" printf "Please choose an option from the menu and enter or ${fgred}x${normal} to exit." read opt @@ -94,6 +95,19 @@ while [ $opt != '' ] 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 + 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;; From b00fbaff085b07d8388e5cd54fae093d343fcdbe Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 12:53:14 -0400 Subject: [PATCH 0084/1385] Update edge-kernel.sh --- misc/edge-kernel.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index 4df61649..2d33940f 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -105,6 +105,7 @@ while [ $opt != '' ] clear; option_picked "Unpinning Current Kernel"; proxmox-boot-tool kernel unpin + clear; break; ;; 5) while true; do From 157ee78ed17c7b635b016180b655fe3d5cac1605 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 12:56:23 -0400 Subject: [PATCH 0085/1385] Update kernel-clean-v3.sh --- misc/kernel-clean-v3.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/misc/kernel-clean-v3.sh b/misc/kernel-clean-v3.sh index 332cc7d8..9ef8c753 100644 --- a/misc/kernel-clean-v3.sh +++ b/misc/kernel-clean-v3.sh @@ -54,11 +54,20 @@ function check_root() { 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 run Kernel Clean\n" + exit 1 + fi +} + 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}" @@ -67,7 +76,7 @@ function kernel_info() { echo -e "${GN}Latest Kernel: $latest_kernel\n${CL}" fi else - echo -e "\n${CROSS}${RD}ERROR: No PVE Kernel Found\n${CL}" + echo -e "\n${CROSS} ${RD}ERROR: No PVE Kernel Found\n${CL}" exit 1 fi } From bc8295a18262e531a9486bbe9bd4b9909b2ef5c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 12:58:34 -0400 Subject: [PATCH 0086/1385] Update edge-kernel.sh --- misc/edge-kernel.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index 2d33940f..e4c37235 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -26,7 +26,7 @@ show_menu(){ 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} 2)${normal} Switch to Proxmox PVE ${menu}${PVE_KERNEL}${normal} 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" printf "${menu}**${number} 5)${normal} Remove Proxmox Edge Kernel & Reboot\n" @@ -67,7 +67,7 @@ while [ $opt != '' ] break; ;; 2) while true; do - read -p "Are you sure you want to Switch to Proxmox PVE ${PVE_KERNEL} Kernel & Reboot? Proceed(y/n)?" yn + 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;; @@ -75,7 +75,7 @@ while [ $opt != '' ] esac done clear; - option_picked "Switching to Proxmox PVE Kernel & Rebooting"; + option_picked "Switching to Proxmox VE 7 Kernel & Rebooting"; proxmox-boot-tool kernel pin ${PVE_KERNEL} reboot break; From 3d2ecc2e0e1daaaac1090df720dc30a1a7348462 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 13:02:13 -0400 Subject: [PATCH 0087/1385] Update README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 656d2bcc..90e48c08 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,24 @@ ________________________________________________________________________________
+
+ 🔸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 From 092c1114d5977d1b272cfca6448a533ac924b691 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 13:04:09 -0400 Subject: [PATCH 0088/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ec3d06c4..812f84c9 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,5 +1,12 @@ +## 2022-07-13 + +### Changed + +- **Proxmox Edge Kernel Tool** + - NEW Script + # Change Log All notable changes to this project will be documented in this file. From 5739f9d94ecdcda3fdc949adf58da8846e46276f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 13:05:07 -0400 Subject: [PATCH 0089/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 90e48c08..147c2e77 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ ________________________________________________________________________________

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 +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. From f119d31a17fcaeeeb67d1e3adc3aa74e492c4c70 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 13:06:39 -0400 Subject: [PATCH 0090/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 147c2e77..4bd30099 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ ________________________________________________________________________________

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 +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. From 67a7537e0b6f90269170a3b38f43e202d44de474 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 14:06:57 -0400 Subject: [PATCH 0091/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 812f84c9..14a16080 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,5 +1,8 @@ +# Change Log +All notable changes to this project will be documented in this file. + ## 2022-07-13 ### Changed @@ -7,9 +10,6 @@ - **Proxmox Edge Kernel Tool** - NEW Script -# Change Log -All notable changes to this project will be documented in this file. - ## 2022-07-11 ### Changed From f12b4e2ab4e3dbc523d1ac7a0628520be5369522 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Jul 2022 17:04:10 -0400 Subject: [PATCH 0092/1385] Update kernel-clean-v3.sh --- misc/kernel-clean-v3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/kernel-clean-v3.sh b/misc/kernel-clean-v3.sh index 9ef8c753..c079d7ea 100644 --- a/misc/kernel-clean-v3.sh +++ b/misc/kernel-clean-v3.sh @@ -63,7 +63,7 @@ function check_root() { 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 run Kernel Clean\n" + echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n" exit 1 fi } From 342b842e40012319e96290ffbabf6397b5ccceae Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Jul 2022 14:42:40 -0400 Subject: [PATCH 0093/1385] Create magicmirror-v3.sh --- ct/magicmirror-v3.sh | 354 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 354 insertions(+) create mode 100644 ct/magicmirror-v3.sh diff --git a/ct/magicmirror-v3.sh b/ct/magicmirror-v3.sh new file mode 100644 index 00000000..bacf531f --- /dev/null +++ b/ct/magicmirror-v3.sh @@ -0,0 +1,354 @@ +#!/usr/bin/env bash +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 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}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +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} + __ __ _____ _____ _____ __ __ _____ _____ _____ ____ _____ + | \/ | /\ / ____|_ _/ ____| \/ |_ _| __ \| __ \ / __ \| __ \ + | \ / | / \ | | __ | || | | \ / | | | | |__) | |__) | | | | |__) | + | |\/| | / /\ \| | |_ | | || | 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}') + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" From a6967f1121daec3975f7886b806bc689d63f4d42 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Jul 2022 14:43:52 -0400 Subject: [PATCH 0094/1385] Create magicmirror-install.sh --- setup/magicmirror-install.sh | 216 +++++++++++++++++++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 setup/magicmirror-install.sh diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh new file mode 100644 index 00000000..b3461fc7 --- /dev/null +++ b/setup/magicmirror-install.sh @@ -0,0 +1,216 @@ +#!/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 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}..." +} + +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 -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 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); + 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 859a28198f2a333824e62bf14e9275fc5adf60cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Jul 2022 15:01:16 -0400 Subject: [PATCH 0095/1385] Update README.md --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 4bd30099..dbfb6d8b 100644 --- a/README.md +++ b/README.md @@ -1513,6 +1513,38 @@ ________________________________________________________________________________
+
+ 🔸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-v3.sh)" +``` + +

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

+ +**MagicMirror Interface - IP:8080** + +⚙️ **To Update MagicMirror** + +Run in the LXC Console +```yaml +cd /opt/magicmirror +git pull && npm install --only=prod --omit=dev +``` + + +____________________________________________________________________________________________ + +
+
PhotoPrism LXC From f8afd9a9af5ccad1406c410100777571acb4c76c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Jul 2022 15:02:56 -0400 Subject: [PATCH 0096/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 14a16080..1455042f 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-07-14 + +### Changed + +- **MagicMirror Server LXC** + - NEW Script + ## 2022-07-13 ### Changed From 79d81465fd64376a79b1b14a7344dd298d51402b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Jul 2022 15:15:48 -0400 Subject: [PATCH 0097/1385] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index dbfb6d8b..e7bbbad5 100644 --- a/README.md +++ b/README.md @@ -1532,6 +1532,10 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/magicmirror- **MagicMirror Interface - IP:8080** +⚙️ **Configuration File** +``` +/opt/magicmirror/config/config.js +``` ⚙️ **To Update MagicMirror** Run in the LXC Console From b970212bd38bdd5f7bdaa0c980d3fbad0f554035 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Jul 2022 15:22:06 -0400 Subject: [PATCH 0098/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e7bbbad5..12580b78 100644 --- a/README.md +++ b/README.md @@ -1533,7 +1533,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/magicmirror- **MagicMirror Interface - IP:8080** ⚙️ **Configuration File** -``` +```yaml /opt/magicmirror/config/config.js ``` ⚙️ **To Update MagicMirror** From 37f86561d25b74bfb964001a6f7a06517f7893e7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Jul 2022 15:56:42 -0400 Subject: [PATCH 0099/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12580b78..6a12c588 100644 --- a/README.md +++ b/README.md @@ -1515,8 +1515,8 @@ ________________________________________________________________________________
🔸MagicMirror Server LXC - +

MagicMirror Server LXC

From cc46348c4da979e47f6c062dfa70d6b66b0dd7dc Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Jul 2022 16:07:01 -0400 Subject: [PATCH 0100/1385] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a12c588..f1a15914 100644 --- a/README.md +++ b/README.md @@ -1532,11 +1532,11 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/magicmirror- **MagicMirror Interface - IP:8080** -⚙️ **Configuration File** +⚙️ **[Configuration](https://docs.magicmirror.builders/configuration/introduction.html#configuring-your-magicmirror)** ```yaml /opt/magicmirror/config/config.js ``` -⚙️ **To Update MagicMirror** +⚙️ **[Update MagicMirror](https://docs.magicmirror.builders/getting-started/upgrade-guide.html#upgrade-guide)** Run in the LXC Console ```yaml From cdcc8394d89519c6854482e255c82d93e52519c0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Jul 2022 19:34:43 -0400 Subject: [PATCH 0101/1385] 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 a25de7fa..8232c560 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -2,7 +2,7 @@ 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.3" +STABLE="8.2" YW=`echo "\033[33m"` BL=`echo "\033[36m"` RD=`echo "\033[01;31m"` From b740252f134b29d304fec17bbc8f7048b7b162b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 01:46:27 -0400 Subject: [PATCH 0102/1385] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f1a15914..b1c95ef2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@

Select a Proxmox Helper

+

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

+trackgit-views 🔸
From da33b37f9b20c0c3585744e2c7756b797336364e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 01:57:06 -0400 Subject: [PATCH 0103/1385] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index b1c95ef2..7740b209 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@

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

-trackgit-views 🔸
From b5be4f6ca0f75710b15d30459768a9bfc0558b8c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 11:58:40 -0400 Subject: [PATCH 0104/1385] Update adguard-v3.sh --- ct/adguard-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/adguard-v3.sh b/ct/adguard-v3.sh index b9bf7a50..655fa9de 100644 --- a/ct/adguard-v3.sh +++ b/ct/adguard-v3.sh @@ -349,6 +349,9 @@ 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 "# 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" From 0b62bc9d65840bb9840ad5d214163eec7f2d463b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:01:20 -0400 Subject: [PATCH 0105/1385] Update debian-v3.sh --- ct/debian-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/debian-v3.sh b/ct/debian-v3.sh index 764d3307..5c872b28 100644 --- a/ct/debian-v3.sh +++ b/ct/debian-v3.sh @@ -349,4 +349,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://github.com/tteck/Proxmox" + msg_ok "Completed Successfully!\n" From 4c734ed8f69056a27a453cafce43adb15c8f146f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:09:37 -0400 Subject: [PATCH 0106/1385] Update daemonsync-v3.sh --- ct/daemonsync-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/daemonsync-v3.sh b/ct/daemonsync-v3.sh index f1f6c66d..2930caaa 100644 --- a/ct/daemonsync-v3.sh +++ b/ct/daemonsync-v3.sh @@ -348,6 +348,9 @@ 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://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" From dde2e34144266e434a5e879fca73cd6fba6dfb2a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:10:09 -0400 Subject: [PATCH 0107/1385] Update dashy-v3.sh --- ct/dashy-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/dashy-v3.sh b/ct/dashy-v3.sh index 004197a8..3b2bf0d4 100644 --- a/ct/dashy-v3.sh +++ b/ct/dashy-v3.sh @@ -348,6 +348,9 @@ 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://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" From 0793150a64529313c2cc33820aa319b17dd652bb Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:10:54 -0400 Subject: [PATCH 0108/1385] Update deconz-v3.sh --- ct/deconz-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/deconz-v3.sh b/ct/deconz-v3.sh index 8667d0ac..246c5616 100644 --- a/ct/deconz-v3.sh +++ b/ct/deconz-v3.sh @@ -361,6 +361,9 @@ 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://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" From da4663a05e8a40b1a1e4a9ab3237d403529afdfe Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:11:43 -0400 Subject: [PATCH 0109/1385] Update docker-v3.sh --- ct/docker-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/docker-v3.sh b/ct/docker-v3.sh index c6f0f248..4dde4984 100644 --- a/ct/docker-v3.sh +++ b/ct/docker-v3.sh @@ -353,4 +353,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://github.com/tteck/Proxmox" + msg_ok "Completed Successfully!\n" From 3e00150ea0b830b3de1c7171e78c07cbb546d81b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:12:27 -0400 Subject: [PATCH 0110/1385] Update esphome-v3.sh --- ct/esphome-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/esphome-v3.sh b/ct/esphome-v3.sh index b044cab7..9f8b2456 100644 --- a/ct/esphome-v3.sh +++ b/ct/esphome-v3.sh @@ -347,6 +347,9 @@ 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://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" From a379018bea6cdb0fe97dc6e8964c73c2cb82db98 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:13:13 -0400 Subject: [PATCH 0111/1385] Update grafana-v3.sh --- ct/grafana-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/grafana-v3.sh b/ct/grafana-v3.sh index 052d3f82..3175cdc2 100644 --- a/ct/grafana-v3.sh +++ b/ct/grafana-v3.sh @@ -346,6 +346,9 @@ 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://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" From c147f847dd079a072cbe62945321d7d5d8470124 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:13:53 -0400 Subject: [PATCH 0112/1385] Update heimdalldashboard-v3.sh --- ct/heimdalldashboard-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/heimdalldashboard-v3.sh b/ct/heimdalldashboard-v3.sh index bcb2ec5b..130e5587 100644 --- a/ct/heimdalldashboard-v3.sh +++ b/ct/heimdalldashboard-v3.sh @@ -347,6 +347,9 @@ 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://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" From a6926733bdf3687e470d23f120f06f7159ac4031 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:14:33 -0400 Subject: [PATCH 0113/1385] Update homeassistant-v3.sh --- ct/homeassistant-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/homeassistant-v3.sh b/ct/homeassistant-v3.sh index 9da9f0c1..382de9a8 100644 --- a/ct/homeassistant-v3.sh +++ b/ct/homeassistant-v3.sh @@ -353,6 +353,9 @@ 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://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} From 5630e929177f794e2eef59a8329a7c66eba8584e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:15:14 -0400 Subject: [PATCH 0114/1385] Update homebridge-v3.sh --- ct/homebridge-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/homebridge-v3.sh b/ct/homebridge-v3.sh index e8af57b3..bb6a1473 100644 --- a/ct/homebridge-v3.sh +++ b/ct/homebridge-v3.sh @@ -346,6 +346,9 @@ 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://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" From 3c334ab730d8d5aa7bb12e8f7aacce116570c99f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:15:56 -0400 Subject: [PATCH 0115/1385] Update influxdb-v3.sh --- ct/influxdb-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/influxdb-v3.sh b/ct/influxdb-v3.sh index cecd1364..c8602b61 100644 --- a/ct/influxdb-v3.sh +++ b/ct/influxdb-v3.sh @@ -347,4 +347,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://github.com/tteck/Proxmox" + msg_ok "Completed Successfully!\n" From d6fae8788dcccf9d13b855541a09b9a422cfce75 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:16:30 -0400 Subject: [PATCH 0116/1385] Update iobroker-v3.sh --- ct/iobroker-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/iobroker-v3.sh b/ct/iobroker-v3.sh index 48139515..3382c5a1 100644 --- a/ct/iobroker-v3.sh +++ b/ct/iobroker-v3.sh @@ -346,6 +346,9 @@ 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://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" From be49ae171fd20be3982cf227aa183d9868b465a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:17:05 -0400 Subject: [PATCH 0117/1385] Update jellyfin-v3.sh --- ct/jellyfin-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/jellyfin-v3.sh b/ct/jellyfin-v3.sh index 651d395c..df1784ff 100644 --- a/ct/jellyfin-v3.sh +++ b/ct/jellyfin-v3.sh @@ -360,6 +360,9 @@ 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://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" From ed99485f67eee202e390ae64b96897ee2596b924 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:17:36 -0400 Subject: [PATCH 0118/1385] Update keycloak-v3.sh --- ct/keycloak-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/keycloak-v3.sh b/ct/keycloak-v3.sh index f78b5052..5794a434 100644 --- a/ct/keycloak-v3.sh +++ b/ct/keycloak-v3.sh @@ -350,6 +350,9 @@ 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://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" From 5e1d0291554bddfb39cbc51badf8f808dff4199d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:18:13 -0400 Subject: [PATCH 0119/1385] Update magicmirror-v3.sh --- ct/magicmirror-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/magicmirror-v3.sh b/ct/magicmirror-v3.sh index bacf531f..b97f981f 100644 --- a/ct/magicmirror-v3.sh +++ b/ct/magicmirror-v3.sh @@ -349,6 +349,9 @@ 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://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" From 6c3654069af68959d7d74e6f74bcbedd69f76a3f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:18:52 -0400 Subject: [PATCH 0120/1385] Update mariadb-v3.sh --- ct/mariadb-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/mariadb-v3.sh b/ct/mariadb-v3.sh index 3925d8fc..da4485e8 100644 --- a/ct/mariadb-v3.sh +++ b/ct/mariadb-v3.sh @@ -346,6 +346,9 @@ 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://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" From 36f4b26739ae9aa7fe369cdc71767842c842d7fb Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:19:30 -0400 Subject: [PATCH 0121/1385] Update meshcentral-v3.sh --- ct/meshcentral-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/meshcentral-v3.sh b/ct/meshcentral-v3.sh index 1d6f2e1b..ddefc38d 100644 --- a/ct/meshcentral-v3.sh +++ b/ct/meshcentral-v3.sh @@ -346,6 +346,9 @@ 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://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" From 57b28a0b4da8b6be256d5eb745677354e6cd343d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:20:05 -0400 Subject: [PATCH 0122/1385] Update motioneye-v3.sh --- ct/motioneye-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/motioneye-v3.sh b/ct/motioneye-v3.sh index f83a2db8..10ade0fd 100644 --- a/ct/motioneye-v3.sh +++ b/ct/motioneye-v3.sh @@ -346,6 +346,9 @@ 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://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" From 8d46f1ab3c78a943cd28bd02805e4fb598effbc9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:20:44 -0400 Subject: [PATCH 0123/1385] Update mqtt-v3.sh --- ct/mqtt-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/mqtt-v3.sh b/ct/mqtt-v3.sh index 3c8c4d14..6da68624 100644 --- a/ct/mqtt-v3.sh +++ b/ct/mqtt-v3.sh @@ -346,4 +346,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://github.com/tteck/Proxmox" + msg_ok "Completed Successfully!\n" From 242d3ae64a52e945370fb2a6b32d0e4f651092cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:21:20 -0400 Subject: [PATCH 0124/1385] Update nginx-proxy-manager-v3.sh --- ct/nginx-proxy-manager-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/nginx-proxy-manager-v3.sh b/ct/nginx-proxy-manager-v3.sh index 40c4bba5..16eff8e0 100644 --- a/ct/nginx-proxy-manager-v3.sh +++ b/ct/nginx-proxy-manager-v3.sh @@ -346,6 +346,9 @@ 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://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" From e4c6ba493f08cce4dfe54adf46938c1fcfe5a18c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:21:57 -0400 Subject: [PATCH 0125/1385] Update nocodb-v3.sh --- ct/nocodb-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/nocodb-v3.sh b/ct/nocodb-v3.sh index c32a23a4..18370502 100644 --- a/ct/nocodb-v3.sh +++ b/ct/nocodb-v3.sh @@ -346,6 +346,9 @@ 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://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" From da0f73a849e7b9ba49cac9622f3f9c77a99ae11e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:22:31 -0400 Subject: [PATCH 0126/1385] Update node-red-v3.sh --- ct/node-red-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/node-red-v3.sh b/ct/node-red-v3.sh index cbd8e44b..cb35cefb 100644 --- a/ct/node-red-v3.sh +++ b/ct/node-red-v3.sh @@ -346,6 +346,9 @@ 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://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" From c56cc4e94ef14792df9906bd6e5fa3a9792fc63e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:23:07 -0400 Subject: [PATCH 0127/1385] Update omada-v3.sh --- ct/omada-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/omada-v3.sh b/ct/omada-v3.sh index be57d41d..eb2e23e3 100644 --- a/ct/omada-v3.sh +++ b/ct/omada-v3.sh @@ -346,6 +346,9 @@ 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://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" From 3927a1aa6937bf76317d3df7e94b9edec4a64874 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:23:45 -0400 Subject: [PATCH 0128/1385] Update openhab-v3.sh --- ct/openhab-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/openhab-v3.sh b/ct/openhab-v3.sh index 78312e12..f3c0bcc6 100644 --- a/ct/openhab-v3.sh +++ b/ct/openhab-v3.sh @@ -351,6 +351,9 @@ 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://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" From a6f802dbcd8d291633664fb7cc34d79d0329afcf Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:24:27 -0400 Subject: [PATCH 0129/1385] Update photoprism-v3.sh --- ct/photoprism-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/photoprism-v3.sh b/ct/photoprism-v3.sh index c77bd81c..6a74a0fe 100644 --- a/ct/photoprism-v3.sh +++ b/ct/photoprism-v3.sh @@ -347,6 +347,9 @@ 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://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" From 3455d8b2f210a322dffc9f7dec3aeaad7c677617 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:25:05 -0400 Subject: [PATCH 0130/1385] Update pihole-v3.sh --- ct/pihole-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/pihole-v3.sh b/ct/pihole-v3.sh index 493d45b4..9bae1e0f 100644 --- a/ct/pihole-v3.sh +++ b/ct/pihole-v3.sh @@ -346,6 +346,9 @@ 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://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" From 5f98181052b0ec064fb801cb544f6b61feff220a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:25:40 -0400 Subject: [PATCH 0131/1385] Update plex-v3.sh --- ct/plex-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/plex-v3.sh b/ct/plex-v3.sh index 96fac292..302b48df 100644 --- a/ct/plex-v3.sh +++ b/ct/plex-v3.sh @@ -358,6 +358,9 @@ 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://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" From c614a279abfa3f45b827e4e3d254ffcd1f760f25 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:26:17 -0400 Subject: [PATCH 0132/1385] Update podman-homeassistant-v3.sh --- ct/podman-homeassistant-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/podman-homeassistant-v3.sh b/ct/podman-homeassistant-v3.sh index 673ec92b..1464ac6f 100644 --- a/ct/podman-homeassistant-v3.sh +++ b/ct/podman-homeassistant-v3.sh @@ -359,6 +359,9 @@ 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://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} From b72616cbc4855960d13a76e0e451ccc5fbd91b5d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:26:53 -0400 Subject: [PATCH 0133/1385] Update postgresql-v3.sh --- ct/postgresql-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/postgresql-v3.sh b/ct/postgresql-v3.sh index 6c26d8b4..8b120b89 100644 --- a/ct/postgresql-v3.sh +++ b/ct/postgresql-v3.sh @@ -351,6 +351,9 @@ 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://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" From 8a117108b053347157254fdb8c4da789a93dbbb2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:27:35 -0400 Subject: [PATCH 0134/1385] Update prometheus-v3.sh --- ct/prometheus-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/prometheus-v3.sh b/ct/prometheus-v3.sh index d2ec1ec6..aab32e44 100644 --- a/ct/prometheus-v3.sh +++ b/ct/prometheus-v3.sh @@ -349,6 +349,9 @@ 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://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" From f088ff7f986671b502a55f5593ec3c45b244bf50 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:28:13 -0400 Subject: [PATCH 0135/1385] Update technitiumdns-v3.sh --- ct/technitiumdns-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/technitiumdns-v3.sh b/ct/technitiumdns-v3.sh index 615cdc64..192e0ab1 100644 --- a/ct/technitiumdns-v3.sh +++ b/ct/technitiumdns-v3.sh @@ -346,6 +346,9 @@ 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://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" From bc81da55e455db02b286aa3f1d1e3689f7d86975 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:28:59 -0400 Subject: [PATCH 0136/1385] Update ubuntu-v3.sh --- ct/ubuntu-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/ubuntu-v3.sh b/ct/ubuntu-v3.sh index 396abc13..a1384182 100644 --- a/ct/ubuntu-v3.sh +++ b/ct/ubuntu-v3.sh @@ -369,4 +369,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://github.com/tteck/Proxmox" + msg_ok "Completed Successfully!\n" From 4e119886e2925613e98ab46e9cf6996b37e5ee82 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:29:42 -0400 Subject: [PATCH 0137/1385] Update unifi-v3.sh --- ct/unifi-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/unifi-v3.sh b/ct/unifi-v3.sh index 57f7fab8..3b237b86 100644 --- a/ct/unifi-v3.sh +++ b/ct/unifi-v3.sh @@ -346,6 +346,9 @@ 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://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" From 5b69499c002474ad5a59705420f9e12dc2a19cab Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:30:21 -0400 Subject: [PATCH 0138/1385] Update uptimekuma-v3.sh --- ct/uptimekuma-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/uptimekuma-v3.sh b/ct/uptimekuma-v3.sh index 56b2afe9..f2287af9 100644 --- a/ct/uptimekuma-v3.sh +++ b/ct/uptimekuma-v3.sh @@ -348,6 +348,9 @@ 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://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" From 9a44a198b174a28c06c7db4a0d758722e8a71e54 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:30:57 -0400 Subject: [PATCH 0139/1385] Update vaultwarden-v3.sh --- ct/vaultwarden-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/vaultwarden-v3.sh b/ct/vaultwarden-v3.sh index 8295542d..b4f264c5 100644 --- a/ct/vaultwarden-v3.sh +++ b/ct/vaultwarden-v3.sh @@ -346,6 +346,9 @@ 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://github.com/tteck/Proxmox" + msg_info "Setting Container to Normal Resources" pct set $CTID -memory 512 pct set $CTID -cores 1 From 3c3283953dcefdbcbbc1e6767deec809f64871be Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:31:45 -0400 Subject: [PATCH 0140/1385] Update whoogle-v3.sh --- ct/whoogle-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/whoogle-v3.sh b/ct/whoogle-v3.sh index 01c2c1ca..8cc19d7e 100644 --- a/ct/whoogle-v3.sh +++ b/ct/whoogle-v3.sh @@ -350,6 +350,9 @@ 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://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" From 4982a59723669d337edb416e17acc9c48fc34927 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:32:18 -0400 Subject: [PATCH 0141/1385] Update wireguard-v3.sh --- ct/wireguard-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/wireguard-v3.sh b/ct/wireguard-v3.sh index 528c57ed..2bebc82a 100644 --- a/ct/wireguard-v3.sh +++ b/ct/wireguard-v3.sh @@ -347,6 +347,9 @@ 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://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" From ef09f25a448a19140b622c320ef4b9b7438aa702 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:32:51 -0400 Subject: [PATCH 0142/1385] Update zigbee2mqtt-v3.sh --- ct/zigbee2mqtt-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/zigbee2mqtt-v3.sh b/ct/zigbee2mqtt-v3.sh index 8d74ba7f..81c57807 100644 --- a/ct/zigbee2mqtt-v3.sh +++ b/ct/zigbee2mqtt-v3.sh @@ -361,4 +361,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://github.com/tteck/Proxmox" + msg_ok "Completed Successfully!\n" From 1a6b8fb8b871562191abb370654de2fcdcb33d9a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:33:41 -0400 Subject: [PATCH 0143/1385] Update zwavejs2mqtt-v3.sh --- ct/zwavejs2mqtt-v3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/zwavejs2mqtt-v3.sh b/ct/zwavejs2mqtt-v3.sh index 7e3e8107..6b54e7c1 100644 --- a/ct/zwavejs2mqtt-v3.sh +++ b/ct/zwavejs2mqtt-v3.sh @@ -344,6 +344,9 @@ 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://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" From ea7902116e2f3dc1151b88cca1d797d789b434f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:42:05 -0400 Subject: [PATCH 0144/1385] Update haos_vm.sh --- vm/haos_vm.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index 8232c560..7307b615 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -337,6 +337,8 @@ 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" msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" From 48889190d1ff9d52ecd9eead6b2361728eab0ace Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:48:01 -0400 Subject: [PATCH 0145/1385] 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 7307b615..cad4c934 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -338,7 +338,7 @@ qm set $VMID \ qm set $VMID \ -boot order=scsi0 >/dev/null qm set $VMID -description "# Home Assistant OS -### https://github.com/tteck/Proxmox" +### https://github.com/tteck/Proxmox" >/dev/null msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" From 9fa467647a696dc36e04b5e9fafe051617c5a72d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 12:55:17 -0400 Subject: [PATCH 0146/1385] Update haos-vm-v3.sh --- vm/haos-vm-v3.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index a25de7fa..d0f8f49d 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -337,7 +337,8 @@ 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 msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" if [ "$START_VM" == "yes" ]; then From 790434c6814b721e79073030689645731ec9ac7e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Jul 2022 15:19:40 -0400 Subject: [PATCH 0147/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7740b209..5e3f51b2 100644 --- a/README.md +++ b/README.md @@ -318,7 +318,7 @@ ________________________________________________________________________________
- 🔸openHAB LXC + openHAB LXC

From 2b73af9c23beba8193baf36737b211fe37572b45 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 16 Jul 2022 12:14:29 -0400 Subject: [PATCH 0148/1385] test script --- vm/pimox-haos.sh | 343 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 343 insertions(+) create mode 100644 vm/pimox-haos.sh diff --git a/vm/pimox-haos.sh b/vm/pimox-haos.sh new file mode 100644 index 00000000..13aaae0b --- /dev/null +++ b/vm/pimox-haos.sh @@ -0,0 +1,343 @@ +#!/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 occured." + 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 -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=6G >/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 f3976828287932aa158239d5f2e5a5fc793aa629 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 16 Jul 2022 15:35:23 -0400 Subject: [PATCH 0149/1385] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5e3f51b2..ff422513 100644 --- a/README.md +++ b/README.md @@ -843,8 +843,7 @@ npm start Run in the LXC console ```yaml -cd /opt/zigbee2mqtt -bash update.sh +cd /opt/zigbee2mqtt && bash update.sh ``` ⚙️ **Copy Data From a Existing Zigbee2MQTT LXC to another Zigbee2MQTT LXC** @@ -1541,8 +1540,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/magicmirror- Run in the LXC Console ```yaml -cd /opt/magicmirror -git pull && npm install --only=prod --omit=dev +cd /opt/magicmirror && git pull && npm install --only=prod --omit=dev ``` From a5e7557870a027442b836c553df3da315300f8f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Jul 2022 12:38:19 -0400 Subject: [PATCH 0150/1385] Update vaultwarden-v3.sh --- ct/vaultwarden-v3.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/vaultwarden-v3.sh b/ct/vaultwarden-v3.sh index b4f264c5..30772996 100644 --- a/ct/vaultwarden-v3.sh +++ b/ct/vaultwarden-v3.sh @@ -88,9 +88,9 @@ function default_settings() { echo -e "${DGN}Using Disk Size ${BGN}6${CL}${DGN}GB${CL}" DISK_SIZE="6" echo -e "${DGN}Using ${BGN}4${CL}${DGN}vCPU${CL}" - CORE_COUNT="4" + CORE_COUNT="2" echo -e "${DGN}Using ${BGN}4096${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="4096" + RAM_SIZE="2048" echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" BRG="vmbr0" echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" @@ -179,9 +179,9 @@ header_info echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" 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: 4 " + echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="4"; fi; + 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 @@ -194,9 +194,9 @@ header_info 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: 4096 " + echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="4096"; fi; + 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 From eea8c0701e6d07743d8cc9d859b8ce822da7dfa4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Jul 2022 12:42:16 -0400 Subject: [PATCH 0151/1385] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ff422513..9d9fc2ad 100644 --- a/README.md +++ b/README.md @@ -1906,6 +1906,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 ⚡

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

**Vaultwarden Interface - IP:8000** From bdee71bc743a5eee9d0700dfd25c8376c754cfbc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Jul 2022 16:34:23 -0400 Subject: [PATCH 0152/1385] Fix Vaultwarden/Web-vault Update scripts (#355) * Update and rename vaultwarden-update.sh to web-vault-update.sh * Create vaultwarden-update.sh * Update web-vault-update.sh * Update web-vault-update.sh * Update web-vault-update.sh * Update web-vault-update.sh * Update web-vault-update.sh * Update vaultwarden-update.sh * Update README.md * Update CHANGELOG.MD * Update vaultwarden-update.sh * Update vaultwarden-update.sh * Update README.md * Update vaultwarden-update.sh * Update vaultwarden-update.sh --- CHANGELOG.MD | 8 ++++++ README.md | 12 ++++++--- misc/vaultwarden-update.sh | 31 ++++++++++++----------- misc/web-vault-update.sh | 50 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+), 19 deletions(-) create mode 100644 misc/web-vault-update.sh diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1455042f..8c231e81 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-17 + +### Changed + +- **Vaultwarden LXC** + - NEW Vaultwarden Update (post 2022-05-29 only) Script + - NEW Web-vault Update (any) Script + ## 2022-07-14 ### Changed diff --git a/README.md b/README.md index 9d9fc2ad..cb04974f 100644 --- a/README.md +++ b/README.md @@ -1888,7 +1888,7 @@ ________________________________________________________________________________
- Vaultwarden LXC + 🔸Vaultwarden LXC

@@ -1909,19 +1909,25 @@ Expect 30+ minute install time.

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

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

-**Vaultwarden Interface - IP:8000** +**Vaultwarden Interface: CTIP:8000** ⚙️ **Path to Vaultwarden .env file** (to enable `ADMIN_TOKEN`) ```yaml /opt/vaultwarden/.env ``` -⚙️ **To Update Vaultwarden** +⚙️ **To Update Vaultwarden (post 2022-05-29 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)" +``` ____________________________________________________________________________________________ diff --git a/misc/vaultwarden-update.sh b/misc/vaultwarden-update.sh index 1a5e7a7d..b645e810 100644 --- a/misc/vaultwarden-update.sh +++ b/misc/vaultwarden-update.sh @@ -1,5 +1,5 @@ -#!/bin/sh -VWRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest \ +#!/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) }') \ @@ -16,13 +16,13 @@ echo -e "${BL} \ \/ / _ | | | | | __\ \ /\ / / _ | __/ _ |/ _ \ _ \ \ / (_| | |_| | | |_ \ V V / (_| | | | (_| | __/ | | | \/ \__,_|\__,_|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_| - UPDATE + ${VAULT} UPDATE ${CL}" } update_info while true; do - read -p "This will Update Vaultwarden to $VWRELEASE. Proceed(y/n)?" yn + read -p "This will Update Vaultwarden to $VAULT (set 2vCPU 2048MiB RAM Min.). Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; @@ -34,18 +34,17 @@ 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} 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/ -echo -e "${GN} Cleaning up... ${CL}" -rm bw_web_$VWRELEASE.tar.gz - -echo -e "${GN} Starting Vaultwarden... ${CL}" +echo -e "${GN} Starting Vaultwarden ${VAULT}... ${CL}" systemctl start vaultwarden.service sleep 1 -echo -e "${GN} Finished Update ${CL}" + +echo -e "${GN} Cleaning up... ${CL}" +cd ~ && rm -rf vaultwarden + +echo -e "${GN} Finished Update (set resources back to normal settings)${CL}" diff --git a/misc/web-vault-update.sh b/misc/web-vault-update.sh new file mode 100644 index 00000000..d55b0aeb --- /dev/null +++ b/misc/web-vault-update.sh @@ -0,0 +1,50 @@ +#!/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 968a3543307ec21e03d57cd51e50611e14b3870d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Jul 2022 22:21:30 -0400 Subject: [PATCH 0153/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cb04974f..5e999a51 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ ________________________________________________________________________________
- 🔸Home Assistant OS VM + Home Assistant OS VM

From e7f73fbd5ee4745a0319e284a884d32b186a2b64 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Jul 2022 03:41:19 -0400 Subject: [PATCH 0154/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e999a51..85ce883c 100644 --- a/README.md +++ b/README.md @@ -1916,7 +1916,7 @@ Expect 30+ minute install time. /opt/vaultwarden/.env ``` -⚙️ **To Update Vaultwarden (post 2022-05-29 only)** +⚙️ **To Update Vaultwarden (post 2022-05-29 installs only)** Run in the LXC console ```yaml From 9d2ff2ca4efee77fb77e4852368699cc062e56f7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Jul 2022 04:25:37 -0400 Subject: [PATCH 0155/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 8c231e81..1783da1d 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed - **Vaultwarden LXC** - - NEW Vaultwarden Update (post 2022-05-29 only) Script + - NEW Vaultwarden Update (post 2022-05-29 installs only) Script - NEW Web-vault Update (any) Script ## 2022-07-14 From 712daafc6a640818fb245de191b403b6691d9372 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Jul 2022 14:03:55 -0400 Subject: [PATCH 0156/1385] test script --- vm/pimox-haos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/pimox-haos.sh b/vm/pimox-haos.sh index 13aaae0b..fa00b8cc 100644 --- a/vm/pimox-haos.sh +++ b/vm/pimox-haos.sh @@ -329,7 +329,7 @@ qm set $VMID \ -scsi0 ${DISK1_REF},size=6G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null -qm resize $VMID scsi0 +26G >/dev/null +#qm resize $VMID scsi0 +26G >/dev/null qm set $VMID -description "# Home Assistant OS ### https://github.com/tteck/Proxmox" >/dev/null From 0fe9d91d38a4c4f7735fa861e6bc4c1241b7a467 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Jul 2022 14:08:12 -0400 Subject: [PATCH 0157/1385] test script --- vm/pimox-haos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/pimox-haos.sh b/vm/pimox-haos.sh index fa00b8cc..d62c3691 100644 --- a/vm/pimox-haos.sh +++ b/vm/pimox-haos.sh @@ -326,7 +326,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=6G >/dev/null + -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null #qm resize $VMID scsi0 +26G >/dev/null From b6c6190600c0e42ea7b98f93dcf9b7f672aacbb4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Jul 2022 14:31:11 -0400 Subject: [PATCH 0158/1385] test script --- vm/pimox-haos.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/pimox-haos.sh b/vm/pimox-haos.sh index d62c3691..a2d29003 100644 --- a/vm/pimox-haos.sh +++ b/vm/pimox-haos.sh @@ -322,10 +322,10 @@ msg_ok "Extracted Disk Image" msg_info "Creating Pi-HAOS VM" qm create $VMID -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 8M 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},efitype=8m,size=8M \ -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null From 6ff4f880ab0eccec44c9a71d3f04e93d1e7cd5bb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Jul 2022 15:04:24 -0400 Subject: [PATCH 0159/1385] test script --- vm/pimox-haos.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vm/pimox-haos.sh b/vm/pimox-haos.sh index a2d29003..41c15126 100644 --- a/vm/pimox-haos.sh +++ b/vm/pimox-haos.sh @@ -320,12 +320,12 @@ done msg_ok "Extracted Disk Image" msg_info "Creating Pi-HAOS VM" -qm create $VMID -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 $VM_NAME -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 8M 1>&/dev/null +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=8m,size=8M \ + -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null From 1285b2fb20e6de9131030fcad627d5e328dc1f9a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Jul 2022 11:47:46 -0400 Subject: [PATCH 0160/1385] Update vaultwarden-v3.sh --- ct/vaultwarden-v3.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/vaultwarden-v3.sh b/ct/vaultwarden-v3.sh index 30772996..bfa156f7 100644 --- a/ct/vaultwarden-v3.sh +++ b/ct/vaultwarden-v3.sh @@ -87,9 +87,9 @@ function default_settings() { HN=$NSAPP echo -e "${DGN}Using Disk Size ${BGN}6${CL}${DGN}GB${CL}" DISK_SIZE="6" - echo -e "${DGN}Using ${BGN}4${CL}${DGN}vCPU${CL}" + echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}4096${CL}${DGN}MiB RAM${CL}" + echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" RAM_SIZE="2048" echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" BRG="vmbr0" From 84865b7f3a4b1ca7429cfd0e95d4ce72d2b1097c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Jul 2022 14:23:02 -0400 Subject: [PATCH 0161/1385] Update jellyfin-install.sh --- setup/jellyfin-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index bc116748..4574a10c 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -98,7 +98,7 @@ After = network.target Type = simple EnvironmentFile = /etc/default/jellyfin User = root -ExecStart = /usr/bin/jellyfin ${JELLYFIN_WEB_OPT} ${JELLYFIN_RESTART_OPT} ${JELLYFIN_FFMPEG_OPT} ${JELL> +ExecStart = /usr/bin/jellyfin Restart = on-failure TimeoutSec = 15 [Install] From f16fd89271a93ff6a88dbb4b964ef1fd707516a3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Jul 2022 19:18:18 -0400 Subject: [PATCH 0162/1385] correct spelling --- 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 d0f8f49d..3e2bcd69 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -24,7 +24,7 @@ trap cleanup EXIT function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 From 73852c9113e4d9de6a27985e33eb5d762d93c760 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Jul 2022 19:19:14 -0400 Subject: [PATCH 0163/1385] correct spelling --- vm/pimox-haos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/pimox-haos.sh b/vm/pimox-haos.sh index 41c15126..38b009ae 100644 --- a/vm/pimox-haos.sh +++ b/vm/pimox-haos.sh @@ -24,7 +24,7 @@ trap cleanup EXIT function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 From 5b9c37ce81334b2350c1e9eab82a2bcf2eb1a248 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Jul 2022 19:19:44 -0400 Subject: [PATCH 0164/1385] correct spelling --- 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 cad4c934..83652ed4 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -24,7 +24,7 @@ trap cleanup EXIT function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 From fca2fcf970b6b956d61a215756cbcd27ff04ea0a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Jul 2022 06:10:39 -0400 Subject: [PATCH 0165/1385] Correct Spelling (#360) * Update adguard-install.sh * Update daemonsync-install.sh * Update dashy-install.sh * Update debian-install.sh * Update deconz-install.sh * Update docker-install.sh * Update esphome-install.sh * Update grafana-install.sh * Update heimdalldashboard-install.sh * Update homeassistant-install.sh * Update homebridge-install.sh * Update influxdb-install.sh * Update iobroker-install.sh * Update jellyfin-install.sh * Update keycloak-install.sh * Update magicmirror-install.sh * Update mariadb-install.sh * Update meshcentral-install.sh * Update motioneye-install.sh * Update mqtt-install.sh * Update nginx-proxy-manager-install.sh * Update nocodb-install.sh * Update node-red-install.sh * Update omada-install.sh * Update openhab-install.sh * Update photoprism-install.sh * Update pihole-install.sh * Update plex-install.sh * Update podman-homeassistant-install.sh * Update postgresql-install.sh * Update prometheus-install.sh * Update technitiumdns-install.sh * Update ubuntu-install.sh * Update unifi-install.sh * Update uptimekuma-install.sh * Update vaultwarden-install.sh * Update whoogle-install.sh * Update wireguard-install.sh * Update zigbee2mqtt-install.sh * Update zwavejs2mqtt-install.sh * Update adguard-v3.sh * Update create_lxc.sh * Update daemonsync-v3.sh * Update dashy-v3.sh * Update debian-v3.sh * Update deconz-v3.sh * Update docker-v3.sh * Update esphome-v3.sh * Update grafana-v3.sh * Update heimdalldashboard-v3.sh * Update homeassistant-v3.sh * Update homebridge-v3.sh * Update influxdb-v3.sh * Update iobroker-v3.sh * Update jellyfin-v3.sh * Update keycloak-v3.sh * Update magicmirror-v3.sh * Update mariadb-v3.sh * Update meshcentral-v3.sh * Update motioneye-v3.sh * Update mqtt-v3.sh * Update nginx-proxy-manager-v3.sh * Update nocodb-v3.sh * Update node-red-v3.sh * Update omada-v3.sh * Update openhab-v3.sh * Update photoprism-v3.sh * Update pihole-v3.sh * Update plex-v3.sh * Update podman-homeassistant-v3.sh * Update postgresql-v3.sh * Update prometheus-v3.sh * Update technitiumdns-v3.sh * Update ubuntu-v3.sh * Update unifi-v3.sh * Update uptimekuma-v3.sh * Update vaultwarden-v3.sh * Update whoogle-v3.sh * Update wireguard-v3.sh * Update zigbee2mqtt-v3.sh * Update zwavejs2mqtt-v3.sh --- ct/adguard-v3.sh | 2 +- ct/create_lxc.sh | 2 +- ct/daemonsync-v3.sh | 2 +- ct/dashy-v3.sh | 2 +- ct/debian-v3.sh | 2 +- ct/deconz-v3.sh | 2 +- ct/docker-v3.sh | 2 +- ct/esphome-v3.sh | 2 +- ct/grafana-v3.sh | 2 +- ct/heimdalldashboard-v3.sh | 2 +- ct/homeassistant-v3.sh | 2 +- ct/homebridge-v3.sh | 2 +- ct/influxdb-v3.sh | 2 +- ct/iobroker-v3.sh | 2 +- ct/jellyfin-v3.sh | 2 +- ct/keycloak-v3.sh | 2 +- ct/magicmirror-v3.sh | 2 +- ct/mariadb-v3.sh | 2 +- ct/meshcentral-v3.sh | 2 +- ct/motioneye-v3.sh | 2 +- ct/mqtt-v3.sh | 2 +- ct/nginx-proxy-manager-v3.sh | 2 +- ct/nocodb-v3.sh | 2 +- ct/node-red-v3.sh | 2 +- ct/omada-v3.sh | 2 +- ct/openhab-v3.sh | 2 +- ct/photoprism-v3.sh | 2 +- ct/pihole-v3.sh | 2 +- ct/plex-v3.sh | 2 +- ct/podman-homeassistant-v3.sh | 2 +- ct/postgresql-v3.sh | 2 +- ct/prometheus-v3.sh | 2 +- ct/technitiumdns-v3.sh | 2 +- ct/ubuntu-v3.sh | 2 +- ct/unifi-v3.sh | 2 +- ct/uptimekuma-v3.sh | 2 +- ct/vaultwarden-v3.sh | 2 +- ct/whoogle-v3.sh | 2 +- ct/wireguard-v3.sh | 2 +- ct/zigbee2mqtt-v3.sh | 2 +- ct/zwavejs2mqtt-v3.sh | 17 +++++++++++++++++ setup/adguard-install.sh | 2 +- setup/daemonsync-install.sh | 2 +- setup/dashy-install.sh | 2 +- setup/debian-install.sh | 2 +- setup/deconz-install.sh | 2 +- setup/docker-install.sh | 2 +- setup/esphome-install.sh | 2 +- setup/grafana-install.sh | 2 +- setup/heimdalldashboard-install.sh | 2 +- setup/homeassistant-install.sh | 2 +- setup/homebridge-install.sh | 2 +- setup/influxdb-install.sh | 2 +- setup/iobroker-install.sh | 2 +- setup/jellyfin-install.sh | 2 +- setup/keycloak-install.sh | 2 +- setup/magicmirror-install.sh | 2 +- setup/mariadb-install.sh | 2 +- setup/meshcentral-install.sh | 2 +- setup/motioneye-install.sh | 2 +- setup/mqtt-install.sh | 2 +- setup/nginx-proxy-manager-install.sh | 2 +- setup/nocodb-install.sh | 2 +- setup/node-red-install.sh | 2 +- setup/omada-install.sh | 2 +- setup/openhab-install.sh | 2 +- setup/photoprism-install.sh | 2 +- setup/pihole-install.sh | 2 +- setup/plex-install.sh | 2 +- setup/podman-homeassistant-install.sh | 2 +- setup/postgresql-install.sh | 2 +- setup/prometheus-install.sh | 2 +- setup/technitiumdns-install.sh | 2 +- setup/ubuntu-install.sh | 2 +- setup/unifi-install.sh | 2 +- setup/uptimekuma-install.sh | 2 +- setup/vaultwarden-install.sh | 2 +- setup/whoogle-install.sh | 2 +- setup/wireguard-install.sh | 2 +- setup/zigbee2mqtt-install.sh | 2 +- setup/zwavejs2mqtt-install.sh | 2 +- 81 files changed, 97 insertions(+), 80 deletions(-) diff --git a/ct/adguard-v3.sh b/ct/adguard-v3.sh index 655fa9de..de7e7e8c 100644 --- a/ct/adguard-v3.sh +++ b/ct/adguard-v3.sh @@ -24,7 +24,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 5bcce863..4cb7864e 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -17,7 +17,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/daemonsync-v3.sh b/ct/daemonsync-v3.sh index 2930caaa..f4b50508 100644 --- a/ct/daemonsync-v3.sh +++ b/ct/daemonsync-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/dashy-v3.sh b/ct/dashy-v3.sh index 3b2bf0d4..8d74bd5d 100644 --- a/ct/dashy-v3.sh +++ b/ct/dashy-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/debian-v3.sh b/ct/debian-v3.sh index 5c872b28..4003fd90 100644 --- a/ct/debian-v3.sh +++ b/ct/debian-v3.sh @@ -29,7 +29,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/deconz-v3.sh b/ct/deconz-v3.sh index 246c5616..6997e34c 100644 --- a/ct/deconz-v3.sh +++ b/ct/deconz-v3.sh @@ -29,7 +29,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/docker-v3.sh b/ct/docker-v3.sh index 4dde4984..bca99c7e 100644 --- a/ct/docker-v3.sh +++ b/ct/docker-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/esphome-v3.sh b/ct/esphome-v3.sh index 9f8b2456..8616eb25 100644 --- a/ct/esphome-v3.sh +++ b/ct/esphome-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/grafana-v3.sh b/ct/grafana-v3.sh index 3175cdc2..d106ab55 100644 --- a/ct/grafana-v3.sh +++ b/ct/grafana-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/heimdalldashboard-v3.sh b/ct/heimdalldashboard-v3.sh index 130e5587..c56ab9e1 100644 --- a/ct/heimdalldashboard-v3.sh +++ b/ct/heimdalldashboard-v3.sh @@ -24,7 +24,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/homeassistant-v3.sh b/ct/homeassistant-v3.sh index 382de9a8..4bedfe63 100644 --- a/ct/homeassistant-v3.sh +++ b/ct/homeassistant-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/homebridge-v3.sh b/ct/homebridge-v3.sh index bb6a1473..0bb4cd62 100644 --- a/ct/homebridge-v3.sh +++ b/ct/homebridge-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/influxdb-v3.sh b/ct/influxdb-v3.sh index c8602b61..075c51d4 100644 --- a/ct/influxdb-v3.sh +++ b/ct/influxdb-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/iobroker-v3.sh b/ct/iobroker-v3.sh index 3382c5a1..55f98b00 100644 --- a/ct/iobroker-v3.sh +++ b/ct/iobroker-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/jellyfin-v3.sh b/ct/jellyfin-v3.sh index df1784ff..2262277d 100644 --- a/ct/jellyfin-v3.sh +++ b/ct/jellyfin-v3.sh @@ -24,7 +24,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/keycloak-v3.sh b/ct/keycloak-v3.sh index 5794a434..ddfd12ae 100644 --- a/ct/keycloak-v3.sh +++ b/ct/keycloak-v3.sh @@ -29,7 +29,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/magicmirror-v3.sh b/ct/magicmirror-v3.sh index b97f981f..ab15832f 100644 --- a/ct/magicmirror-v3.sh +++ b/ct/magicmirror-v3.sh @@ -29,7 +29,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/mariadb-v3.sh b/ct/mariadb-v3.sh index da4485e8..3ec3fd17 100644 --- a/ct/mariadb-v3.sh +++ b/ct/mariadb-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/meshcentral-v3.sh b/ct/meshcentral-v3.sh index ddefc38d..1b47dfc1 100644 --- a/ct/meshcentral-v3.sh +++ b/ct/meshcentral-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/motioneye-v3.sh b/ct/motioneye-v3.sh index 10ade0fd..a837501c 100644 --- a/ct/motioneye-v3.sh +++ b/ct/motioneye-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/mqtt-v3.sh b/ct/mqtt-v3.sh index 6da68624..d9e7f025 100644 --- a/ct/mqtt-v3.sh +++ b/ct/mqtt-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/nginx-proxy-manager-v3.sh b/ct/nginx-proxy-manager-v3.sh index 16eff8e0..3485393f 100644 --- a/ct/nginx-proxy-manager-v3.sh +++ b/ct/nginx-proxy-manager-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/nocodb-v3.sh b/ct/nocodb-v3.sh index 18370502..34712d40 100644 --- a/ct/nocodb-v3.sh +++ b/ct/nocodb-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/node-red-v3.sh b/ct/node-red-v3.sh index cb35cefb..f0331e4d 100644 --- a/ct/node-red-v3.sh +++ b/ct/node-red-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/omada-v3.sh b/ct/omada-v3.sh index eb2e23e3..513d93f3 100644 --- a/ct/omada-v3.sh +++ b/ct/omada-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/openhab-v3.sh b/ct/openhab-v3.sh index f3c0bcc6..35d512c4 100644 --- a/ct/openhab-v3.sh +++ b/ct/openhab-v3.sh @@ -29,7 +29,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/photoprism-v3.sh b/ct/photoprism-v3.sh index 6a74a0fe..bc2f2362 100644 --- a/ct/photoprism-v3.sh +++ b/ct/photoprism-v3.sh @@ -24,7 +24,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/pihole-v3.sh b/ct/pihole-v3.sh index 9bae1e0f..88c5a57e 100644 --- a/ct/pihole-v3.sh +++ b/ct/pihole-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/plex-v3.sh b/ct/plex-v3.sh index 302b48df..8d3ea495 100644 --- a/ct/plex-v3.sh +++ b/ct/plex-v3.sh @@ -24,7 +24,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/podman-homeassistant-v3.sh b/ct/podman-homeassistant-v3.sh index 1464ac6f..97d2048d 100644 --- a/ct/podman-homeassistant-v3.sh +++ b/ct/podman-homeassistant-v3.sh @@ -24,7 +24,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/postgresql-v3.sh b/ct/postgresql-v3.sh index 8b120b89..788fea92 100644 --- a/ct/postgresql-v3.sh +++ b/ct/postgresql-v3.sh @@ -29,7 +29,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/prometheus-v3.sh b/ct/prometheus-v3.sh index aab32e44..ad555450 100644 --- a/ct/prometheus-v3.sh +++ b/ct/prometheus-v3.sh @@ -29,7 +29,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/technitiumdns-v3.sh b/ct/technitiumdns-v3.sh index 192e0ab1..107dfe7d 100644 --- a/ct/technitiumdns-v3.sh +++ b/ct/technitiumdns-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/ubuntu-v3.sh b/ct/ubuntu-v3.sh index a1384182..586f4f82 100644 --- a/ct/ubuntu-v3.sh +++ b/ct/ubuntu-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/unifi-v3.sh b/ct/unifi-v3.sh index 3b237b86..40d5a222 100644 --- a/ct/unifi-v3.sh +++ b/ct/unifi-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/uptimekuma-v3.sh b/ct/uptimekuma-v3.sh index f2287af9..fc5eb477 100644 --- a/ct/uptimekuma-v3.sh +++ b/ct/uptimekuma-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/vaultwarden-v3.sh b/ct/vaultwarden-v3.sh index bfa156f7..38a23d01 100644 --- a/ct/vaultwarden-v3.sh +++ b/ct/vaultwarden-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/whoogle-v3.sh b/ct/whoogle-v3.sh index 8cc19d7e..c0529fb3 100644 --- a/ct/whoogle-v3.sh +++ b/ct/whoogle-v3.sh @@ -30,7 +30,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/wireguard-v3.sh b/ct/wireguard-v3.sh index 2bebc82a..b0bf0bac 100644 --- a/ct/wireguard-v3.sh +++ b/ct/wireguard-v3.sh @@ -23,7 +23,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/zigbee2mqtt-v3.sh b/ct/zigbee2mqtt-v3.sh index 81c57807..3a48dd9c 100644 --- a/ct/zigbee2mqtt-v3.sh +++ b/ct/zigbee2mqtt-v3.sh @@ -24,7 +24,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/ct/zwavejs2mqtt-v3.sh b/ct/zwavejs2mqtt-v3.sh index 6b54e7c1..99afdd8d 100644 --- a/ct/zwavejs2mqtt-v3.sh +++ b/ct/zwavejs2mqtt-v3.sh @@ -14,6 +14,23 @@ 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 read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index 9837589f..fd8ff882 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index 60d6e1cf..2af9de0a 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index f172a1c2..02039294 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/debian-install.sh b/setup/debian-install.sh index e7c6af98..48e7eb1f 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index e367205f..d38b416a 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/docker-install.sh b/setup/docker-install.sh index fed664cf..aec07703 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index 44fe61fa..e8c0c05a 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index 12a96358..9eff5400 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index 5ebef0e8..852068d8 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 77ab5de4..8ee274bb 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index 70e455d3..8ba3327f 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 441f4070..216949e7 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index c9650bab..9db4f6d3 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index 4574a10c..dccddafe 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index 53da44b8..b593459c 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index b3461fc7..3513f225 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index e5680925..18db68da 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index 2155cf4a..485b352f 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index 730a5266..4b96cc31 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index c84f645d..fd52f630 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index 686a4b60..afa87e32 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index 7b9c96c7..9e51d2e1 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index 313da248..058fb297 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/omada-install.sh b/setup/omada-install.sh index 0423e373..598dabde 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index 25e9f9ab..c4e69e18 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 9ad97e85..51a62770 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -22,7 +22,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index 0e9b413d..0a47cc07 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/plex-install.sh b/setup/plex-install.sh index 08695424..c5030bc2 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index 0ed099da..43fd53b9 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index 8cbc6aa3..c9cc2a7b 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index 87338f49..e83fa5a0 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index 18d2eca6..1a9e5271 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index bc311688..7173f364 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 071ef075..f47cb3e3 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -22,7 +22,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index 57c13fc2..948ab37f 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index 78c22b10..ec4da4f3 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index ce4803f6..52d65c56 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index 8109a2a0..4804a3c6 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 0e7f6ad6..8056c2b6 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 diff --git a/setup/zwavejs2mqtt-install.sh b/setup/zwavejs2mqtt-install.sh index 0d2c1ead..06aabdda 100644 --- a/setup/zwavejs2mqtt-install.sh +++ b/setup/zwavejs2mqtt-install.sh @@ -21,7 +21,7 @@ trap die ERR function error_exit() { trap - ERR - local reason="Unknown failure occured." + local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" echo -e "$flag $msg" 1>&2 From 1c3ba6c2bc289523662570db0fbc0f2f8b375c95 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Jul 2022 07:48:59 -0400 Subject: [PATCH 0166/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85ce883c..01873670 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ ________________________________________________________________________________
- 🔸Proxmox Edge Kernel Tool + Proxmox Edge Kernel Tool

From e851a070bdd326be665ea8439917ae6c09a19887 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Jul 2022 12:20:27 -0400 Subject: [PATCH 0167/1385] add exiftool --- setup/photoprism-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 51a62770..20fa12c9 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -70,6 +70,7 @@ 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" From d8bb779b1f5b3f77c991a2f710f03d3feef3db28 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Jul 2022 20:27:31 -0400 Subject: [PATCH 0168/1385] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 01873670..c8882b35 100644 --- a/README.md +++ b/README.md @@ -1514,7 +1514,7 @@ ________________________________________________________________________________
- 🔸MagicMirror Server LXC + MagicMirror Server LXC

From 43cc17f6d221b85672d92105a0b16ef171577c82 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 07:00:47 -0400 Subject: [PATCH 0169/1385] 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 3e2bcd69..34459f59 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -2,7 +2,7 @@ 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.3" +STABLE="8.2" YW=`echo "\033[33m"` BL=`echo "\033[36m"` RD=`echo "\033[01;31m"` From be3ba17993a3c27370adb3350e19d5aa337c3a7a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 07:50:42 -0400 Subject: [PATCH 0170/1385] Update haos-vm-v3.sh --- vm/haos-vm-v3.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index 34459f59..8c6e2a2f 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -2,7 +2,7 @@ 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"` @@ -258,7 +258,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 From df91454ca6c2574fdf9f7ebe9849c33888c81183 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 08:47:16 -0400 Subject: [PATCH 0171/1385] Update haos-vm-v3.sh --- vm/haos-vm-v3.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index 8c6e2a2f..105aad6d 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -1,4 +1,5 @@ #!/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) RELEASE=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') @@ -50,6 +51,7 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null while true; do + clear read -p "This will create a New Home Assistant OS VM. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; From ed377bd06d3a311d9c9d6f91c4a15a57b0ef4ef0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 10:22:33 -0400 Subject: [PATCH 0172/1385] Maintenance (#365) * Update debian-v3.sh * Update debian-v3.sh * Update adguard-v3.sh * Update daemonsync-v3.sh * Update dashy-v3.sh * Update deconz-v3.sh * Update docker-v3.sh * Update esphome-v3.sh * Update grafana-v3.sh * Update heimdalldashboard-v3.sh * Update homeassistant-v3.sh * Update homebridge-v3.sh * Update influxdb-v3.sh * Update iobroker-v3.sh * Update jellyfin-v3.sh * Update keycloak-v3.sh * Update magicmirror-v3.sh * Update mariadb-v3.sh * Update meshcentral-v3.sh * Update motioneye-v3.sh * Update mqtt-v3.sh * Update nginx-proxy-manager-v3.sh * Update nocodb-v3.sh * Update node-red-v3.sh * Update omada-v3.sh * Update openhab-v3.sh * Update photoprism-v3.sh * Update pihole-v3.sh * Update plex-v3.sh * Update podman-homeassistant-v3.sh * Update postgresql-v3.sh * Update prometheus-v3.sh * Update technitiumdns-v3.sh * Update ubuntu-v3.sh * Update unifi-v3.sh * Update uptimekuma-v3.sh * Update vaultwarden-v3.sh * Update whoogle-v3.sh * Update wireguard-v3.sh * Update zigbee2mqtt-v3.sh * Update zwavejs2mqtt-v3.sh * Update haos_vm.sh * Update haos_vm.sh --- ct/adguard-v3.sh | 3 ++- ct/daemonsync-v3.sh | 2 ++ ct/dashy-v3.sh | 2 ++ ct/debian-v3.sh | 2 ++ ct/deconz-v3.sh | 2 ++ ct/docker-v3.sh | 2 ++ ct/esphome-v3.sh | 2 ++ ct/grafana-v3.sh | 2 ++ ct/heimdalldashboard-v3.sh | 2 ++ ct/homeassistant-v3.sh | 2 ++ ct/homebridge-v3.sh | 2 ++ ct/influxdb-v3.sh | 2 ++ ct/iobroker-v3.sh | 2 ++ ct/jellyfin-v3.sh | 2 ++ ct/keycloak-v3.sh | 2 ++ ct/magicmirror-v3.sh | 2 ++ ct/mariadb-v3.sh | 2 ++ ct/meshcentral-v3.sh | 2 ++ ct/motioneye-v3.sh | 2 ++ ct/mqtt-v3.sh | 2 ++ ct/nginx-proxy-manager-v3.sh | 2 ++ ct/nocodb-v3.sh | 2 ++ ct/node-red-v3.sh | 2 ++ ct/omada-v3.sh | 2 ++ ct/openhab-v3.sh | 2 ++ ct/photoprism-v3.sh | 2 ++ ct/pihole-v3.sh | 2 ++ ct/plex-v3.sh | 2 ++ ct/podman-homeassistant-v3.sh | 2 ++ ct/postgresql-v3.sh | 2 ++ ct/prometheus-v3.sh | 2 ++ ct/technitiumdns-v3.sh | 2 ++ ct/ubuntu-v3.sh | 2 ++ ct/unifi-v3.sh | 2 ++ ct/uptimekuma-v3.sh | 2 ++ ct/vaultwarden-v3.sh | 2 ++ ct/whoogle-v3.sh | 2 ++ ct/wireguard-v3.sh | 2 ++ ct/zigbee2mqtt-v3.sh | 2 ++ ct/zwavejs2mqtt-v3.sh | 2 ++ vm/haos_vm.sh | 4 +++- 41 files changed, 83 insertions(+), 2 deletions(-) diff --git a/ct/adguard-v3.sh b/ct/adguard-v3.sh index de7e7e8c..26955d34 100644 --- a/ct/adguard-v3.sh +++ b/ct/adguard-v3.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -32,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/daemonsync-v3.sh b/ct/daemonsync-v3.sh index f4b50508..df44541e 100644 --- a/ct/daemonsync-v3.sh +++ b/ct/daemonsync-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/dashy-v3.sh b/ct/dashy-v3.sh index 8d74bd5d..b7e795d2 100644 --- a/ct/dashy-v3.sh +++ b/ct/dashy-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/debian-v3.sh b/ct/debian-v3.sh index 4003fd90..79c9bdd1 100644 --- a/ct/debian-v3.sh +++ b/ct/debian-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." APP="Debian" var_disk="2" var_cpu="1" @@ -47,6 +48,7 @@ function msg_ok() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/deconz-v3.sh b/ct/deconz-v3.sh index 6997e34c..3679fb6c 100644 --- a/ct/deconz-v3.sh +++ b/ct/deconz-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." APP="deCONZ" var_disk="4" var_cpu="2" @@ -47,6 +48,7 @@ function msg_ok() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/docker-v3.sh b/ct/docker-v3.sh index bca99c7e..3c2c71a4 100644 --- a/ct/docker-v3.sh +++ b/ct/docker-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/esphome-v3.sh b/ct/esphome-v3.sh index 8616eb25..b39f4f07 100644 --- a/ct/esphome-v3.sh +++ b/ct/esphome-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/grafana-v3.sh b/ct/grafana-v3.sh index d106ab55..cf708a67 100644 --- a/ct/grafana-v3.sh +++ b/ct/grafana-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/heimdalldashboard-v3.sh b/ct/heimdalldashboard-v3.sh index c56ab9e1..1a1eb641 100644 --- a/ct/heimdalldashboard-v3.sh +++ b/ct/heimdalldashboard-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' PP=`echo "\e[1;35m"` @@ -32,6 +33,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/homeassistant-v3.sh b/ct/homeassistant-v3.sh index 4bedfe63..ad4dc553 100644 --- a/ct/homeassistant-v3.sh +++ b/ct/homeassistant-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/homebridge-v3.sh b/ct/homebridge-v3.sh index 0bb4cd62..629a9a19 100644 --- a/ct/homebridge-v3.sh +++ b/ct/homebridge-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/influxdb-v3.sh b/ct/influxdb-v3.sh index 075c51d4..d4288d8b 100644 --- a/ct/influxdb-v3.sh +++ b/ct/influxdb-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/iobroker-v3.sh b/ct/iobroker-v3.sh index 55f98b00..f6a52106 100644 --- a/ct/iobroker-v3.sh +++ b/ct/iobroker-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/jellyfin-v3.sh b/ct/jellyfin-v3.sh index 2262277d..59b4cae9 100644 --- a/ct/jellyfin-v3.sh +++ b/ct/jellyfin-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -32,6 +33,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/keycloak-v3.sh b/ct/keycloak-v3.sh index ddfd12ae..f11080d3 100644 --- a/ct/keycloak-v3.sh +++ b/ct/keycloak-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." APP="Keycloak" var_disk="4" var_cpu="2" @@ -47,6 +48,7 @@ function msg_ok() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/magicmirror-v3.sh b/ct/magicmirror-v3.sh index ab15832f..fc2fa201 100644 --- a/ct/magicmirror-v3.sh +++ b/ct/magicmirror-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." APP="MagicMirror" var_disk="3" var_cpu="1" @@ -47,6 +48,7 @@ function msg_ok() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/mariadb-v3.sh b/ct/mariadb-v3.sh index 3ec3fd17..74c52575 100644 --- a/ct/mariadb-v3.sh +++ b/ct/mariadb-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/meshcentral-v3.sh b/ct/meshcentral-v3.sh index 1b47dfc1..ff411439 100644 --- a/ct/meshcentral-v3.sh +++ b/ct/meshcentral-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/motioneye-v3.sh b/ct/motioneye-v3.sh index a837501c..1c3ca29e 100644 --- a/ct/motioneye-v3.sh +++ b/ct/motioneye-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/mqtt-v3.sh b/ct/mqtt-v3.sh index d9e7f025..7d74a950 100644 --- a/ct/mqtt-v3.sh +++ b/ct/mqtt-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/nginx-proxy-manager-v3.sh b/ct/nginx-proxy-manager-v3.sh index 3485393f..bfcf2225 100644 --- a/ct/nginx-proxy-manager-v3.sh +++ b/ct/nginx-proxy-manager-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/nocodb-v3.sh b/ct/nocodb-v3.sh index 34712d40..9ede88a8 100644 --- a/ct/nocodb-v3.sh +++ b/ct/nocodb-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/node-red-v3.sh b/ct/node-red-v3.sh index f0331e4d..58252e17 100644 --- a/ct/node-red-v3.sh +++ b/ct/node-red-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/omada-v3.sh b/ct/omada-v3.sh index 513d93f3..7b97dace 100644 --- a/ct/omada-v3.sh +++ b/ct/omada-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/openhab-v3.sh b/ct/openhab-v3.sh index 35d512c4..a4726cb0 100644 --- a/ct/openhab-v3.sh +++ b/ct/openhab-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." APP="openHAB" var_disk="8" var_cpu="2" @@ -47,6 +48,7 @@ function msg_ok() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/photoprism-v3.sh b/ct/photoprism-v3.sh index bc2f2362..3f90236f 100644 --- a/ct/photoprism-v3.sh +++ b/ct/photoprism-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' PP=`echo "\e[1;35m"` @@ -32,6 +33,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/pihole-v3.sh b/ct/pihole-v3.sh index 88c5a57e..03a5b577 100644 --- a/ct/pihole-v3.sh +++ b/ct/pihole-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/plex-v3.sh b/ct/plex-v3.sh index 8d3ea495..da77b58e 100644 --- a/ct/plex-v3.sh +++ b/ct/plex-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -32,6 +33,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/podman-homeassistant-v3.sh b/ct/podman-homeassistant-v3.sh index 97d2048d..30985849 100644 --- a/ct/podman-homeassistant-v3.sh +++ b/ct/podman-homeassistant-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -32,6 +33,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/postgresql-v3.sh b/ct/postgresql-v3.sh index 788fea92..d68d8102 100644 --- a/ct/postgresql-v3.sh +++ b/ct/postgresql-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." APP="PostgreSQL" var_disk="4" var_cpu="1" @@ -47,6 +48,7 @@ function msg_ok() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/prometheus-v3.sh b/ct/prometheus-v3.sh index ad555450..a41f5125 100644 --- a/ct/prometheus-v3.sh +++ b/ct/prometheus-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." APP="Prometheus" var_disk="4" var_cpu="1" @@ -47,6 +48,7 @@ function msg_ok() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/technitiumdns-v3.sh b/ct/technitiumdns-v3.sh index 107dfe7d..201b6267 100644 --- a/ct/technitiumdns-v3.sh +++ b/ct/technitiumdns-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/ubuntu-v3.sh b/ct/ubuntu-v3.sh index 586f4f82..5f5b38b1 100644 --- a/ct/ubuntu-v3.sh +++ b/ct/ubuntu-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/unifi-v3.sh b/ct/unifi-v3.sh index 40d5a222..158758b1 100644 --- a/ct/unifi-v3.sh +++ b/ct/unifi-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/uptimekuma-v3.sh b/ct/uptimekuma-v3.sh index fc5eb477..d9cb376b 100644 --- a/ct/uptimekuma-v3.sh +++ b/ct/uptimekuma-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/vaultwarden-v3.sh b/ct/vaultwarden-v3.sh index 38a23d01..735160ff 100644 --- a/ct/vaultwarden-v3.sh +++ b/ct/vaultwarden-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/whoogle-v3.sh b/ct/whoogle-v3.sh index c0529fb3..59274f4e 100644 --- a/ct/whoogle-v3.sh +++ b/ct/whoogle-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." APP="Whoogle" var_disk="2" var_cpu="1" @@ -48,6 +49,7 @@ function msg_ok() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/wireguard-v3.sh b/ct/wireguard-v3.sh index b0bf0bac..284f665c 100644 --- a/ct/wireguard-v3.sh +++ b/ct/wireguard-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -31,6 +32,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/zigbee2mqtt-v3.sh b/ct/zigbee2mqtt-v3.sh index 3a48dd9c..46a61c82 100644 --- a/ct/zigbee2mqtt-v3.sh +++ b/ct/zigbee2mqtt-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -32,6 +33,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/ct/zwavejs2mqtt-v3.sh b/ct/zwavejs2mqtt-v3.sh index 99afdd8d..88b9c87c 100644 --- a/ct/zwavejs2mqtt-v3.sh +++ b/ct/zwavejs2mqtt-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +echo -e "Loading..." NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=`echo "\033[33m"` @@ -32,6 +33,7 @@ function error_exit() { } while true; do + clear read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index 83652ed4..1153be37 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -1,8 +1,9 @@ #!/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) 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="8.1" YW=`echo "\033[33m"` BL=`echo "\033[36m"` RD=`echo "\033[01;31m"` @@ -50,6 +51,7 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null while true; do + clear read -p "This will create a New Home Assistant OS VM. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; From 2cd95851e5c32cae709a77cbd1832623e36542cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 18:01:51 -0400 Subject: [PATCH 0173/1385] Create grocy-install.sh --- setup/grocy-install.sh | 117 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 setup/grocy-install.sh diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh new file mode 100644 index 00000000..1e5890d9 --- /dev/null +++ b/setup/grocy-install.sh @@ -0,0 +1,117 @@ +#!/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 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 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_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 + +EOF + +sed -i '//,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf +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); + 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/latest +msg_ok "Cleaned" From 6ba7d6709adbbd3cb85a48668cf7cdbb5b7857fa Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 18:04:06 -0400 Subject: [PATCH 0174/1385] Create grocy-v3.sh --- ct/grocy-v3.sh | 359 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 359 insertions(+) create mode 100644 ct/grocy-v3.sh diff --git a/ct/grocy-v3.sh b/ct/grocy-v3.sh new file mode 100644 index 00000000..38f6b555 --- /dev/null +++ b/ct/grocy-v3.sh @@ -0,0 +1,359 @@ +#!/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" From ea3e3da4243ad28a8ccb143efe38d8226346d8c0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 18:35:32 -0400 Subject: [PATCH 0175/1385] Update README.md --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8882b35..0518e291 100644 --- a/README.md +++ b/README.md @@ -1592,6 +1592,46 @@ ________________________________________________________________________________
+
+ 🔸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-v3.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 +``` +____________________________________________________________________________________________ + +
+
Daemon Sync Server LXC @@ -1645,7 +1685,6 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/motioneye-v3 ``` - ⚙️ **To Update MotionEye** Run in the LXC console @@ -1793,6 +1832,7 @@ apt update && apt upgrade -y ____________________________________________________________________________________________
+
Tailscale From 178a2a52a759e47c478001af8bb995a2a005071d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 18:36:36 -0400 Subject: [PATCH 0176/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1783da1d..7c407340 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-07-21 + +### Changed + +- **grocy LXC** + - NEW Script + ## 2022-07-17 ### Changed From 481af56d723420508e98328beb09f15ed147593d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 18:54:13 -0400 Subject: [PATCH 0177/1385] Update grocy-install.sh --- setup/grocy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 1e5890d9..e12d9cc1 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -78,7 +78,7 @@ 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 - +mkdir /var/log/apache2/ cat < /etc/apache2/sites-available/grocy.conf ServerAdmin webmaster@localhost From 2fa3057c18f14da0f8fbf1b5d7edadbdac2e0340 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 19:02:20 -0400 Subject: [PATCH 0178/1385] Update grocy-install.sh --- setup/grocy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index e12d9cc1..1e5890d9 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -78,7 +78,7 @@ 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 -mkdir /var/log/apache2/ + cat < /etc/apache2/sites-available/grocy.conf ServerAdmin webmaster@localhost From 24973788d84f2fecbbd4399e634794170099bf26 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 19:03:23 -0400 Subject: [PATCH 0179/1385] Update grocy-install.sh --- setup/grocy-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 1e5890d9..7801c8e2 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -83,6 +83,7 @@ cat < /etc/apache2/sites-available/grocy.conf ServerAdmin webmaster@localhost DocumentRoot /var/www/html/public + ErrorLog /var/log/apache2/error.log EOF From d49eb76efa612765b533e237fcdb43e6fe910daf Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 19:12:48 -0400 Subject: [PATCH 0180/1385] Update grocy-install.sh --- setup/grocy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 7801c8e2..0dc26dff 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -114,5 +114,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/latest +rm -rf /root/latest msg_ok "Cleaned" From 35536242bdc745bda6994267a873de390cbc2151 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 19:49:02 -0400 Subject: [PATCH 0181/1385] Update README.md --- README.md | 80 +++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 0518e291..652c75d8 100644 --- a/README.md +++ b/README.md @@ -1513,6 +1513,46 @@ ________________________________________________________________________________
+
+ 🔸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-v3.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 @@ -1592,46 +1632,6 @@ ________________________________________________________________________________
-
- 🔸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-v3.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 -``` -____________________________________________________________________________________________ - -
-
Daemon Sync Server LXC From 5569dfd040c7a88afc776c9f7c3448ca9d9e0310 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 21:40:40 -0400 Subject: [PATCH 0182/1385] Update grocy-install.sh --- setup/grocy-install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 0dc26dff..b9f62174 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -84,10 +84,15 @@ 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 -sed -i '//,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf a2dissite 000-default.conf &>/dev/null a2ensite grocy.conf &>/dev/null a2enmod rewrite &>/dev/null @@ -114,5 +119,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /root/latest +rm -rf /var/cache/* /var/lib/apt/lists/* /root/latest msg_ok "Cleaned" From 56b433b3663ee2ee94da3baa394acaf5e233b22a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 22:01:22 -0400 Subject: [PATCH 0183/1385] Update grocy-install.sh --- setup/grocy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index b9f62174..cffdefa3 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -119,5 +119,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/cache/* /var/lib/apt/lists/* /root/latest +rm -rf /var/cache/* /var/lib/apt/lists/* /var/log/!(apache2) /root/latest msg_ok "Cleaned" From eef478d0555901fbd3887b793778c695ae2bf114 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Jul 2022 22:14:24 -0400 Subject: [PATCH 0184/1385] Update grocy-install.sh --- setup/grocy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index cffdefa3..de7bc523 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -119,5 +119,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/cache/* /var/lib/apt/lists/* /var/log/!(apache2) /root/latest +rm -rf /var/cache/* /root/latest msg_ok "Cleaned" From 7d7c5d62aeca71576d1a64a367470c2468405130 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Jul 2022 12:38:04 -0400 Subject: [PATCH 0185/1385] Create n8n-v3.sh --- ct/n8n-v3.sh | 356 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 356 insertions(+) create mode 100644 ct/n8n-v3.sh diff --git a/ct/n8n-v3.sh b/ct/n8n-v3.sh new file mode 100644 index 00000000..1347f25c --- /dev/null +++ b/ct/n8n-v3.sh @@ -0,0 +1,356 @@ +#!/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" From 3a6404f2d33c62f12b0c75de738825c9cef8e145 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Jul 2022 12:39:51 -0400 Subject: [PATCH 0186/1385] Create n8n-install.sh --- setup/n8n-install.sh | 116 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 setup/n8n-install.sh diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh new file mode 100644 index 00000000..09670422 --- /dev/null +++ b/setup/n8n-install.sh @@ -0,0 +1,116 @@ +#!/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 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); + 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 d5090dc7071b11a7e328d1cd8a52d23ccd18451f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Jul 2022 12:47:55 -0400 Subject: [PATCH 0187/1385] Update README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 652c75d8..868f2de5 100644 --- a/README.md +++ b/README.md @@ -583,6 +583,35 @@ ________________________________________________________________________________
+
+ 🔸n8n LXC + +

+ +

n8n LXC

+ +[n8n](https://n8n.io/) is a workflow automation platform that doesn't box you in, that you never outgrow + +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)" +``` + +

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

+ +**n8n Interface: IP:5678** + +⚙️ **To Update n8n** + +```yaml +npm update -g n8n +``` + +____________________________________________________________________________________________ + +
+
Mariadb LXC From 1bc6c0c4e9b4813fdebe1125e4108ddd7491ea31 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Jul 2022 12:50:26 -0400 Subject: [PATCH 0188/1385] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 7c407340..e6005cd1 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-07-22 + +### Changed + +- **n8n LXC** (thanks to @cyakimov) + - NEW Script + ## 2022-07-21 ### Changed From 193c4d799409884cc029362e276a02acdb1d0334 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Jul 2022 16:47:28 -0400 Subject: [PATCH 0189/1385] 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 0190/1385] 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 0191/1385] 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 0192/1385] 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 0193/1385] 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 0194/1385] 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 0195/1385] 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 0196/1385] 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 0197/1385] 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 0198/1385] 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 0199/1385] 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 0200/1385] 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 0201/1385] 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 0202/1385] 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 0203/1385] 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 0204/1385] 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 0205/1385] 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 0206/1385] 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 0207/1385] 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 0208/1385] 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 0209/1385] 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 0210/1385] 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 0211/1385] 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 0212/1385] 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 0213/1385] 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 0214/1385] 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 0215/1385] 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 0216/1385] 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 0217/1385] 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 0218/1385] 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 0219/1385] 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 0220/1385] 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 0221/1385] 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 0222/1385] 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 0223/1385] 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 0224/1385] 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 0225/1385] 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 0226/1385] 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 0227/1385] 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 0228/1385] 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 0229/1385] 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 0230/1385] 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 0231/1385] 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 0232/1385] 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 0233/1385] 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 0234/1385] 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 0235/1385] 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 0236/1385] 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 0237/1385] 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 0238/1385] 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 0239/1385] 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 0240/1385] 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 0241/1385] 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 0242/1385] 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 0243/1385] 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 0244/1385] 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 0245/1385] 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 0246/1385] 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 0247/1385] 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 0248/1385] 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 0249/1385] 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 0250/1385] 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 0251/1385] 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 0252/1385] 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 0253/1385] 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 0254/1385] 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 0255/1385] 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 0256/1385] 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 0257/1385] 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 0258/1385] 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 0259/1385] 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 0260/1385] 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 0261/1385] 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 0262/1385] 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 0263/1385] 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 0264/1385] 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 0265/1385] 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 0266/1385] 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 0267/1385] 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 0268/1385] 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 0269/1385] 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 0270/1385] 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 0271/1385] 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 0272/1385] 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 0273/1385] 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 0274/1385] 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 0275/1385] 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 0276/1385] 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 0277/1385] 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 0278/1385] 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 0279/1385] 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 0280/1385] 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 0281/1385] 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 0282/1385] 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 0283/1385] 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 0284/1385] 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 0285/1385] 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 0286/1385] 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 0287/1385] 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 0288/1385] 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 0289/1385] 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 0290/1385] 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 0291/1385] 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 0292/1385] 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 0293/1385] 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 0294/1385] 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 0295/1385] 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 0296/1385] 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 0297/1385] 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 0298/1385] 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 0299/1385] 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 0300/1385] 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 0301/1385] 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 0302/1385] 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 0303/1385] 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 0304/1385] 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 0305/1385] 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 0306/1385] 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 0307/1385] 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 0308/1385] 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 0309/1385] 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 0310/1385] 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 0311/1385] 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 0312/1385] 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 0313/1385] 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 0314/1385] 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 0315/1385] 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 0316/1385] 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 0317/1385] 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 0318/1385] 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 0319/1385] 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 0320/1385] 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 0321/1385] 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 0322/1385] 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 0323/1385] 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 0324/1385] 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 0325/1385] 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 0326/1385] 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 0327/1385] 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 0328/1385] 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 0329/1385] 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 0330/1385] 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 0331/1385] 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 0332/1385] 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 0333/1385] 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 0334/1385] 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 0335/1385] 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 0336/1385] 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 0337/1385] 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 0338/1385] 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 0339/1385] 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 0340/1385] 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 0341/1385] 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 0342/1385] 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 0343/1385] 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 0344/1385] 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 0345/1385] 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 0346/1385] 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 0347/1385] 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 0348/1385] 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 0349/1385] 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 0350/1385] 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 0351/1385] 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 0352/1385] 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 0353/1385] 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 0354/1385] 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 0355/1385] 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 0356/1385] 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*9u>-4)UdLY7>NbRGI2VI2A4`%vx>V*li(NuyeiZy zf(BPlUqJ6Zm4JogBinnrRi(w#w@-rH5ic<>S%(ntNwc3?CA>Zw-wlKTiKnY@>~=c` z4jc&81qBozACDwS{fft6Fp!j##J+v|ShZ>uIXOAJ_uhNVoH>)ZbLUc5S4U=MX0PH& zPEKaVj2YN$wt);GDq?l;(bwWI8{j~LpKly>h1D;cprdGEY*^XnH&wo0?xw8EQV z44GXfsN#oLFL?RcDG&b0^9z828AiT2x$~p>eYKZoKJ@_blW7Jv-DSY7!kj}2=h_52 zXT`88O^5y+2LOx4>-c9*Y{b4(OB^(NB9EcbC785V3BBJs-N1{PMvQV`0g!+e4@}ChC|F6FGd`eZj}w`xQ2w zbdx?-X5ZpCl8imuWgJvk_`Z|l&3?9|8+aijLZdEx_Y*e-l^tUF%)?LrjyTCYsBq}2zh9rM zO4G3=-9UMZ%I$jY&Kgc)0UEwLT+wus9aGL zEEY?@XQ0^FSj=WKwY9YzI&_FBQ>L(X?OIY(Q+fOCx2dkK#$vG$6B9#1LIT^iZDY!m zDL^2}uz2xeN=r+J?0`tDx9ahzu&u(4UV zC~Hw!SL#LpPu|h@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YC~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 0357/1385] 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 0358/1385] 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 0359/1385] 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 0360/1385] 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 0361/1385] 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 0362/1385] 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 0363/1385] 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 0364/1385] 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 0365/1385] 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 0366/1385] 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 0367/1385] 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 0368/1385] 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 0369/1385] 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 0370/1385] 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 0371/1385] 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 0372/1385] 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 0373/1385] 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 0374/1385] 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 0375/1385] 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 0376/1385] 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 0377/1385] 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 0378/1385] 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 0379/1385] 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 0380/1385] 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 0381/1385] 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 0382/1385] 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 0383/1385] 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 0384/1385] 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 0385/1385] 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 0386/1385] 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 0387/1385] 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 0388/1385] 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 0389/1385] 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 0390/1385] 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 0391/1385] 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 0392/1385] 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 0393/1385] 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 0394/1385] 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 0395/1385] 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 0396/1385] 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 0397/1385] 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 0398/1385] 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 0399/1385] 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 0400/1385] 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 0401/1385] 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 0402/1385] 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 0403/1385] 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 0404/1385] 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 0405/1385] 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 0406/1385] 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 0407/1385] 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 0408/1385] 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 0409/1385] 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 0410/1385] 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 0411/1385] 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 0412/1385] 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 0413/1385] 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 0414/1385] 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 0415/1385] 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 0416/1385] 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 0417/1385] 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 0418/1385] 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 0419/1385] 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 0420/1385] 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 0421/1385] 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 0422/1385] 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 0423/1385] 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 0424/1385] 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 0425/1385] 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 0426/1385] 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 0427/1385] 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 0428/1385] 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 0429/1385] 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 0430/1385] 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 0431/1385] 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 0432/1385] 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 0433/1385] 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 0434/1385] 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 0435/1385] 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 0436/1385] 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 0437/1385] 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 0438/1385] 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 0439/1385] 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 0440/1385] 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 0441/1385] 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 0442/1385] 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 0443/1385] 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 0444/1385] 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 0445/1385] 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 0446/1385] 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 0447/1385] 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 0448/1385] 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 0449/1385] 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<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-Or4{TS=GFV?>Bo;B z_n*51uT7<1J7GQ&3<(T{Nrb1(iCF|f<&7_c8kRZq{L!QIV-zjrG5g;>jAqrP44DId zTV}AEQ+sc7`*L({-B^7()g)Bj;JK~m?MIy#mGD-vpfap ziv&zOYeF|`mNj#XI{o&)4EggLSr1M_1t&`%wX)bwsVT9FI+0jMGuB-ZZ(O5!wbehT zzNjx)-*2K*lJ4`}1dm&)L5v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1^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 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 0450/1385] 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 0451/1385] 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 0452/1385] 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 0453/1385] 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 0454/1385] 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 0455/1385] 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 0456/1385] 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 0457/1385] 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 0458/1385] 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 0459/1385] 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 0460/1385] 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 0461/1385] 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 0462/1385] 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 0463/1385] 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 0464/1385] 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 0465/1385] 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 0466/1385] 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 0467/1385] 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 0468/1385] 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 0469/1385] 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 0470/1385] 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 0471/1385] 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 0472/1385] 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 0473/1385] 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 0474/1385] 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 0475/1385] 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 0476/1385] 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 0477/1385] 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 0478/1385] 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 0479/1385] 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 0480/1385] 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 0481/1385] 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 0482/1385] 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 0483/1385] 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 0484/1385] 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 0485/1385] 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 0486/1385] 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 0487/1385] 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 0488/1385] 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 0489/1385] 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 0490/1385] 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 0491/1385] 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 0492/1385] 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 0493/1385] 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 0494/1385] 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 0495/1385] 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 0496/1385] 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 0497/1385] 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 0498/1385] 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 0499/1385] 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 0500/1385] 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 0501/1385] 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 0502/1385] 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 0503/1385] 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 0504/1385] 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 0505/1385] 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 0506/1385] 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 0507/1385] 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 0508/1385] 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 0509/1385] 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 0510/1385] 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 0511/1385] 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 0512/1385] 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 0513/1385] 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 0514/1385] 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 0515/1385] 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 0516/1385] 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 0517/1385] 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 0518/1385] 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 0519/1385] 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 0520/1385] 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 0521/1385] 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 0522/1385] 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 0523/1385] 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 0524/1385] 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 0525/1385] 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 0526/1385] 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 0527/1385] 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 0528/1385] 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 0529/1385] 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+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U8t8P8u(B2t^jV}MYSh{x~ zvXj$x2PkWh6n~w~QvF!UKNVQfaZrr@p;k_^>sC}zg2a>jjsbAsKW`^&dQaF zQRsMknqru7-Ki_w%kwDAjjI7@gHba#9OS68yjVd=QHPO~W8E4*FVBQ+w(-q2z#&YSd zW|iuce%I%8M!Pz+qz7BRbKMg|U`bp8<-1xWK;5*wS_Xwy%c^?q|~X429KJ7}`f5@Hl1$1{YLTr*p5E zy87z`hToV84DxkW1|(HsDJPoJnSenvu*w8bAJ6pbG*V?MrrOCJ&a54JabE=_IJCQb z42(^s#6f+9MkZFpRKgUMuXwR*R=TT!bAF?MFo1x0d=y-lu_=J?9yT(~4F7W>V X(HY04u5`KO00000NkvXXu0mjfCXXUp literal 0 HcmV?d00001 From c3e7f17b6b2ef10f5fe1287b3b415d402b5bdd99 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 12:38:00 -0400 Subject: [PATCH 0530/1385] 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 0531/1385] 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 0532/1385] 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 0533/1385] 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 0534/1385] 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 0535/1385] 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 0536/1385] 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 0537/1385] 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 0538/1385] 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 0539/1385] 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 0540/1385] 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 0541/1385] 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 0542/1385] 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 0543/1385] 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 0544/1385] 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 0545/1385] 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 0546/1385] 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 0547/1385] 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 0548/1385] 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 0549/1385] 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 0550/1385] 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 0551/1385] 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 0552/1385] 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 0553/1385] 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 0554/1385] 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 0555/1385] 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 0556/1385] 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 0557/1385] 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 0558/1385] 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 0559/1385] 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 0560/1385] 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 0561/1385] 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 0562/1385] 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 0563/1385] 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 0564/1385] 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 0565/1385] 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 0566/1385] 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 0567/1385] 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 0568/1385] 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 0569/1385] 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 0570/1385] 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 0571/1385] 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 0572/1385] 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 0573/1385] 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 0574/1385] 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 0575/1385] 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 0576/1385] 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 0577/1385] 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 0578/1385] 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 0579/1385] 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 0580/1385] 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 0581/1385] 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 0582/1385] 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 0583/1385] 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 0584/1385] 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 0585/1385] 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 0586/1385] 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 0587/1385] 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 0588/1385] 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 0589/1385] 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 0590/1385] 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 0591/1385] 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 0592/1385] 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 0593/1385] 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 0594/1385] 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 0595/1385] 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 0596/1385] 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 0597/1385] 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 0598/1385] 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 0599/1385] 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 0600/1385] 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 0601/1385] 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 0602/1385] 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 0603/1385] 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 0604/1385] 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 0605/1385] 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 0606/1385] 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 0607/1385] 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 0608/1385] 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 0609/1385] 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 0610/1385] 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 0611/1385] 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 0612/1385] 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 0613/1385] 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 0614/1385] 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 0615/1385] 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 0616/1385] 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 0617/1385] 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 0618/1385] 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 0619/1385] 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 0620/1385] 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 0621/1385] 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 0622/1385] 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 0623/1385] 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 0624/1385] 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 0625/1385] 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 0626/1385] 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 0627/1385] 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 0628/1385] 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 0629/1385] 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 0630/1385] 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 0631/1385] 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 0632/1385] 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 0633/1385] 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 0634/1385] 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 0635/1385] 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 0636/1385] 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 0637/1385] 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 0638/1385] 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 0639/1385] 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 0640/1385] 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 0641/1385] 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 0642/1385] 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 0643/1385] 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 0644/1385] 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 0645/1385] 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 0646/1385] 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 0647/1385] 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 0648/1385] 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 0649/1385] 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 0650/1385] 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 0651/1385] 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 0652/1385] 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 0653/1385] 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 0654/1385] 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 0655/1385] 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 0656/1385] 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 0657/1385] 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 0658/1385] 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 0659/1385] 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 0660/1385] 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 0661/1385] 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 0662/1385] 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 0663/1385] 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 0664/1385] 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 0665/1385] 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 0666/1385] 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 0667/1385] 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 0668/1385] 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 0669/1385] 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 0670/1385] 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 0671/1385] 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 0672/1385] 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 0673/1385] 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 0674/1385] 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 0675/1385] 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 0676/1385] 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 0677/1385] 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 0678/1385] 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 0679/1385] 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 0680/1385] 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 0681/1385] 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 0682/1385] 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 0683/1385] 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 0684/1385] 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 0685/1385] 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 0686/1385] 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 0687/1385] 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 0688/1385] 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 0689/1385] 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 0690/1385] 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 0691/1385] 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 0692/1385] 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 0693/1385] 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 0694/1385] 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 0695/1385] 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 0696/1385] 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 0697/1385] 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 0698/1385] 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 0699/1385] 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 0700/1385] 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 0701/1385] 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 0702/1385] 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 0703/1385] 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 0704/1385] 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 0705/1385] 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 0706/1385] 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 0707/1385] 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 0708/1385] 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 0709/1385] 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 0710/1385] 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 0711/1385] 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 0712/1385] 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 0713/1385] 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 0714/1385] 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 0715/1385] 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 0716/1385] 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 0717/1385] 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 0718/1385] 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 0719/1385] 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 0720/1385] 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 0721/1385] 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 0722/1385] 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 0723/1385] 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 0724/1385] 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 0725/1385] 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 0726/1385] 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 0727/1385] 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 0728/1385] 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 0729/1385] 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 0730/1385] 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 0731/1385] 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 0732/1385] 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 0733/1385] 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 0734/1385] 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 0735/1385] 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 0736/1385] 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 0737/1385] 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 0738/1385] 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 0739/1385] 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 0740/1385] 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 0741/1385] 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 0742/1385] 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 0743/1385] 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 0744/1385] 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 0745/1385] 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 0746/1385] 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 0747/1385] 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 0748/1385] 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 0749/1385] 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 0750/1385] 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 0751/1385] 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 0752/1385] 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 0753/1385] 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 0754/1385] 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 0755/1385] 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 0756/1385] 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 0757/1385] 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 0758/1385] 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 0759/1385] 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 0760/1385] 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 0761/1385] 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 0762/1385] 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 0763/1385] 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 0764/1385] 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 0765/1385] 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 0766/1385] 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 0767/1385] 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 0768/1385] 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 0769/1385] 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 0770/1385] 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 0771/1385] 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 0772/1385] 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 0773/1385] 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 0774/1385] 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 0775/1385] 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 0776/1385] 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 0777/1385] 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 0778/1385] 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 0779/1385] 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 0780/1385] 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 0781/1385] 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 0782/1385] 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 0783/1385] 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 0784/1385] 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 0785/1385] 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 0786/1385] 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 0787/1385] 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 0788/1385] 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 0789/1385] 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 0790/1385] 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 0791/1385] 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 0792/1385] 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 0793/1385] 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 0794/1385] 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 0795/1385] 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 0796/1385] 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 0797/1385] 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 0798/1385] 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 0799/1385] 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 0800/1385] 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 0801/1385] 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 0802/1385] 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 0803/1385] 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 0804/1385] 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 0805/1385] 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 0806/1385] 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 0807/1385] 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 0808/1385] 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 0809/1385] 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 0810/1385] 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 0811/1385] 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 0812/1385] 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 0813/1385] 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 0814/1385] 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 0815/1385] 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 0816/1385] 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 0817/1385] 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 0818/1385] 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 0819/1385] 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 0820/1385] 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 0821/1385] 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 0822/1385] 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 0823/1385] 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 0824/1385] 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 0825/1385] 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 0826/1385] 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 0827/1385] 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 0828/1385] 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 0829/1385] 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 0830/1385] 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 0831/1385] 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 0832/1385] 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 0833/1385] 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 0834/1385] 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 0835/1385] 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 0836/1385] 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 0837/1385] 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 0838/1385] 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 0839/1385] 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 0840/1385] 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 0841/1385] 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 0842/1385] 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 0843/1385] 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 0844/1385] 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 0845/1385] 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 0846/1385] 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 0847/1385] 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 0848/1385] 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 0849/1385] 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 0850/1385] 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 0851/1385] 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 0852/1385] 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 0853/1385] 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 0854/1385] 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 0855/1385] 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 0856/1385] 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 0857/1385] 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 0858/1385] 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 0859/1385] 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 0860/1385] 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 0861/1385] 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 0862/1385] 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 0863/1385] 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 0864/1385] 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 0865/1385] 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 0866/1385] 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 0867/1385] 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 0868/1385] 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 0869/1385] 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 0870/1385] 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 0871/1385] 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 0872/1385] 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 0873/1385] 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 0874/1385] 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 0875/1385] 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 0876/1385] 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 0877/1385] 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 0878/1385] 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 0879/1385] 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 0880/1385] 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 0881/1385] 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 0882/1385] 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 0883/1385] 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 0884/1385] 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 0885/1385] 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 0886/1385] 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 0887/1385] 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 0888/1385] 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 0889/1385] 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 0890/1385] 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 0891/1385] 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 0892/1385] 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 0893/1385] 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 0894/1385] 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 0895/1385] 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 0896/1385] 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 0897/1385] 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 0898/1385] 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 0899/1385] 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 0900/1385] 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 0901/1385] 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 0902/1385] 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 0903/1385] 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 0904/1385] 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 0905/1385] 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 0906/1385] 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 0907/1385] 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 0908/1385] 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 0909/1385] 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 0910/1385] 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 0911/1385] 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 0912/1385] 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 0913/1385] 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 0914/1385] 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 0915/1385] 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 0916/1385] 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 0917/1385] 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 0918/1385] 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 0919/1385] 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 0920/1385] 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 0921/1385] 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 0922/1385] 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 0923/1385] 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 0924/1385] 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 0925/1385] 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 0926/1385] 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 0927/1385] 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 0928/1385] 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 0929/1385] 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 0930/1385] 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 0931/1385] 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 0932/1385] 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 0933/1385] 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 0934/1385] 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 0935/1385] 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 0936/1385] 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 0937/1385] 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 0938/1385] 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 0939/1385] 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 0940/1385] 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 0941/1385] 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 0942/1385] 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 0943/1385] 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 0944/1385] 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 0945/1385] 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 0946/1385] 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 0947/1385] 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 0948/1385] 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 0949/1385] 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 0950/1385] 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 0951/1385] 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 0952/1385] 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 0953/1385] 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 0954/1385] 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 0955/1385] 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 0956/1385] 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 0957/1385] 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 0958/1385] 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 0959/1385] 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 0960/1385] 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 0961/1385] 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 0962/1385] 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 0963/1385] 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 0964/1385] 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 0965/1385] 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 0966/1385] 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 0967/1385] 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 0968/1385] 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 0969/1385] 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 0970/1385] 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 0971/1385] 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 0972/1385] 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 0973/1385] 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 0974/1385] 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 0975/1385] 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 0976/1385] 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 0977/1385] 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 0978/1385] 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 0979/1385] 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 0980/1385] 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 0981/1385] 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 0982/1385] 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 0983/1385] 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 0984/1385] 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 0985/1385] 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 0986/1385] 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 0987/1385] 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 0988/1385] 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 0989/1385] 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 0990/1385] 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 0991/1385] 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 0992/1385] 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 0993/1385] 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 0994/1385] 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 0995/1385] 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 0996/1385] 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 0997/1385] 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 0998/1385] 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 0999/1385] 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 1000/1385] 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 1001/1385] 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 1002/1385] 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 1003/1385] 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 1004/1385] 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 1005/1385] 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 1006/1385] 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 1007/1385] 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 1008/1385] 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 1009/1385] 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 1010/1385] 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 1011/1385] 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 1012/1385] 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 1013/1385] 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 1014/1385] 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 1015/1385] 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 1016/1385] 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 1017/1385] 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 1018/1385] 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 1019/1385] 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 1020/1385] 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 1021/1385] 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 1022/1385] 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 1023/1385] 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 1024/1385] 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 1025/1385] 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 1026/1385] 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 1027/1385] 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 1028/1385] 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 1029/1385] 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 1030/1385] 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 1031/1385] 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 1032/1385] 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 1033/1385] 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 1034/1385] 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 1035/1385] 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 1036/1385] 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 1037/1385] 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 1038/1385] 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 1039/1385] 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 1040/1385] 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 1041/1385] 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 1042/1385] 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 1043/1385] 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 1044/1385] 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 1045/1385] 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 1046/1385] 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 1047/1385] 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 1048/1385] 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 1049/1385] 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 1050/1385] 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 1051/1385] 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 1052/1385] 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 1053/1385] 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 1054/1385] 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 1055/1385] 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 1056/1385] 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 1057/1385] 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 1058/1385] 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 1059/1385] 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 1060/1385] 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 1061/1385] 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 1062/1385] 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 1063/1385] 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 1064/1385] 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 1065/1385] 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 1066/1385] 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 1067/1385] 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 1068/1385] 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 1069/1385] 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 1070/1385] 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 1071/1385] 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 1072/1385] 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 1073/1385] 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 1074/1385] 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 1075/1385] 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 1076/1385] 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 1077/1385] 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 1078/1385] 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 1079/1385] 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 1080/1385] 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 1081/1385] 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 1082/1385] 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 1083/1385] 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 1084/1385] 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 1085/1385] 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 1086/1385] 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 1087/1385] 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 1088/1385] 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 1089/1385] 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 1090/1385] 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 1091/1385] 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 1092/1385] 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 1093/1385] 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 1094/1385] 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 1095/1385] 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 1096/1385] 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 1097/1385] 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 1098/1385] 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 1099/1385] 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 1100/1385] 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 1101/1385] 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 1102/1385] 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 1103/1385] 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 1104/1385] 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 1105/1385] 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 1106/1385] 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 1107/1385] 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 1108/1385] 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 1109/1385] 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 1110/1385] 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*(AF-POhk49J6^I>D7P z422jb0MZ#Ld$7V+{{+b0W7>^?MezR=sUb`I(^#!ebNuR6fu`pE47g2!DHN0@xWu9H z37~XT5tz%UR z)N(@Wr+FrZkt-K=Ni#V~5IV~g(1u(qp_p#pU$V(t-v+R53q>*AgfP-5BpIety9O}2 z1tgJCAOiRlve$?Qk#P5LPNNdwkMZy>=>k**xfALzqCdo8RW1PC_;NRf9j}8~Q6m1F zC4}^uI65fb0Wd0^;xTb5HJ29-3i|%XBb*-00c$c3BIeP*!oX%FQHW@Vh-|D*vc*2m z@x~cUCFh4&C7>iq7Oc19_=&x6B!0eRk*ajlf!#*@h>AA^hP{UnuD_`Wf&T}P(SKVqaE z7GHF(zNEVvvdE{#SdS?4QYN6T*qZ&kvs;7$Bk+S}k8n(eU<2JxTdVQ^ME9KO`2-fhH1=I|Mn(iry~ zllQ5!fGY2|GuQA!zx0@_|EcIus4+x%X|!x!r6NLImTzTf!G>7*?oUL^3j@RlXNb;% z7HyEyhOR$Kyy*L*+?#3YvI@_IHUUq|dKy*S3Nf)$3A!5Wrt$kh>>Qk*Jaubv} z=HmR~wFdZu^BTG>SHghaSShRRuu?m4wAK0#jJ3g&k=uYx&~qy@Fc{A^+JI>08+ znoeBtJS>zS z5S5$_Ej?(=j-Xjz>)E(#`N_#X=!&?C?YKL2sBG-_kZ`G}DMB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3%(Nz z>zSLlF+A}-eWq33h)sk^|7Y)^>ANqUJ?FRhlb@>5+WV_?3EtTvOQXK$ML>rs^}BIj0L2ta_L*#GuS63) z?TyI9Q$=IvU8Cbh#HaLN@7vNJJ6b^kH8JP$mVv8PiLd;&4yvUklg}gOvZlS zydw_=#NO`S7q7bi@`*K&6GiLu9(aqbXxQNkfVLO5*LhaKc-1vajYL|tW)&%X5)%B- z%-V86ddHit6FL`EF*2MwwyJ$7MH6UF?ibNbe=;n5TVft63#B$;h&yEVhVMvN0zE3| zC$AfP?yKK*EIkj^zhHKzlVkugZ#NT|R6EF3u`%#QM!Lu9u4{2cKqG_%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 1111/1385] 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 1112/1385] 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 1113/1385] 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 1114/1385] 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 1115/1385] 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 1116/1385] 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 1117/1385] 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 1118/1385] 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 1119/1385] 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 1120/1385] 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 1121/1385] 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 1122/1385] 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 1123/1385] 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 1124/1385] 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 1125/1385] 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 1126/1385] 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 1127/1385] 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 1128/1385] 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 1129/1385] 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 1130/1385] 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 1131/1385] 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 1132/1385] 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 1133/1385] 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 1134/1385] 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 1135/1385] 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 1136/1385] 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 1137/1385] 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 1138/1385] 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 1139/1385] 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 1140/1385] 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 1141/1385] 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 1142/1385] 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 1143/1385] 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 1144/1385] 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 zo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tteckster Date: Sun, 15 Jan 2023 22:49:08 -0500 Subject: [PATCH 1145/1385] 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@`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*9u>-4)UdLY7>NbRGI2VI2A4`%vx>V*li(NuyeiZy zf(BPlUqJ6Zm4JogBinnrRi(w#w@-rH5ic<>S%(ntNwc3?CA>Zw-wlKTiKnY@>~=c` z4jc&81qBozACDwS{fft6Fp!j##J+v|ShZ>uIXOAJ_uhNVoH>)ZbLUc5S4U=MX0PH& zPEKaVj2YN$wt);GDq?l;(bwWI8{j~LpKly>h1D;cprdGEY*^XnH&wo0?xw8EQV z44GXfsN#oLFL?RcDG&b0^9z828AiT2x$~p>eYKZoKJ@_blW7Jv-DSY7!kj}2=h_52 zXT`88O^5y+2LOx4>-c9*Y{b4(OB^(NB9EcbC785V3BBJs-N1{PMvQV`0g!+e4@}ChC|F6FGd`eZj}w`xQ2w zbdx?-X5ZpCl8imuWgJvk_`Z|l&3?9|8+aijLZdEx_Y*e-l^tUF%)?L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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 From b2e0e57b90d8c8c3c24e1e35780d76859f6ed13e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:49:18 -0500 Subject: [PATCH 1146/1385] 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?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 Jan 2023 22:49:30 -0500 Subject: [PATCH 1147/1385] 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{ znPeuDnIun`qPzqWJU;xlZ{LulBt@0~vxomlBrNoQ+7fCZtA@orRs{cxn>nTd8b`w7g^-UvZcvB2E_)Ul0)_}k>fxqLDtZZ z9ngh?KQ{g%;D|AYqLX(pkh9uI!9t>oz^agQAy7^gz#A`f9HvBa1k^w9RXdU|V7IdsvezP~)QG_EVojOsaLJ#pqPxu< zH{)UH%5xkBb>8OON*ZW7xH&&Cg$`k;Q3d!+8z|q)tJS?63l*{Fkg%t8tKl zMrCSzGWM16l{MPGbJ_A_Ik=!uo<0&;wuxJ?ASfrR!utoSV2W*Xa{#W}s&zRxI^HW! zP;#a^gvQv{Q0^JMeJ0!A5UDyeN;oj8)Mdc&)FH^1@)OxwzSNr!VJs6^Uf7!cfN_%*)*CZ){1N4AZRiC%XRU$d?M z)~av$l|a^;$j&`tP0ebD<%|e9Y@j4MnL5Hrav_lG_v?96$=#IiJv%K2HUIS+wU5SO zO;z?fkgH~&ha4W@+v>hF;kLEmAj6%!d0C6k_I2#zt-Sgsif0~@zE8)K;KARj)xv4~ zyn2ALL}=T?QfKZGcR$r`aL35kT{`5E;ht)4Z;H|!JxkTRoc$VO%P z7XG6IC58xgfG1)h7F&!-DBJC;AUg_h$5b$A5?NGl#v?}RNPI@ijPAD-TbVd_Dynx% zvXG)+%$Gyc53sw`7krP(_?-9I>N<))>>3yU#uVLg}=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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)!uvwn*&5pY<>$ihjc&=YrhrK&EW!#Ad6~ZWJR~9m!2)p)ZO|z|nbn^7 z-tIdsA}@%@|A@%fMPx=7_W}`lm5A^@tnEyT$nzp{Qrlc9BCiyYm+L(cf_}K~MQ!i6 zzE5czjFbCmn|Jjr!bbl~91~D>{b%)Unb&_r6wv3}9%R@qSK3 zo)(c43MlAsxrnS25!z&KCiP5env?;Ut$@k+8zzCtj1gl}Je2CtlCiLuJP*wP6EFIK z$!z|N^GLvO<%MQmFd$=xp3L_(N_W6+Qrx6Bp!}MM92Sv(*S28*XixtaD=x0k_P~k> zfS4BJJLbchvA*B{JRA*#P{){Kz+|8R;d?~n-6Ha~+i$=9^?Ud31sK`OIrrlD`1s)H z=qQBf?8v!Ki^$(7F(J}Bz4zCZ@AKYEUtiy!=|o=Ry}vTosdH|>i2R9&{G&>t?-h|B z^4{MV^6C>MzcH2y&md8_w+eYcZx&i#gn{JFLbbHR9>cq#qOB#%))N+ z-UHG`mvc@=M@MCRd^|=#I3GYDt=5Rh+r9S?EOsv{9~HLRd!Hm84?5?#_n?UUkv4RL zh+N~nhl?v$Utiyp_x?XrnyvNTBRyhcKx!~n-Y>cBw%gV{_~3)kr>o03S4dIsec9%2 z)XvDri0s|FmjO7A_IqwC8#N1Ko8n8AdZfb(sI5|c@wX5g%w0cJO#RFJesM@QZG_;^JU z>j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GUyu@v5Be~FyWcixh3_njZC|lM4m-ODrbvbJ46p`D%qHdlI2i{f6izPlfbNXL zwunG$V^dj zuoUM3P6zL#_!?bNwgilQk%I#>1?0PCbs8IecAkMEM;{PwiTK$WeH?s z4f_jeXSR~{Z{smwS--|8%-a^WvIvoFyW!YOy_?FnwW%{p={q)$kme!1!q4HF*7aj^ zkB!st!`MwS(>4G#^ACoo6ap9+>_JmAaDbhKxl~4clL`0kIrk`FXNO|?p+%6+rfuhE zYrq8Ah+;%MHWc;)b_1%b{wR!dk9fTqEe!>bmUd1ic0T?BCKD!u)%F%W8!(G4uj-+4 zQrg{1Gp=5%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 1149/1385] 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!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cdWq2}X9&{Q&qmnjc5~)3Yz{4|e`+=$xU*W^I)?mSc z1!!z+Kv7XKs%k5_{Op3MS6Q`bAD5GnM{{b)T+#*+0Fr&Fv7w2|-qX`VReC#l9cJlN zn5k1EL`TfVz{iW!hdeyMHMQex`397hmVzrQ#oRgbQCU?{R**l9LPk?Ho0XBn4Gi{E zMaVYbc6;dRm(k=<#Ng-$M^RK%1gq78*M8rHxAiNa)iBVir6B4T0ON@(=;?Eyja^3r zV@*vBlD6wHCwv|%Ybv;c+`_39GMe_WSs8g0h^S(*SSN)c6RK4zbaws?85tSWwCQ#K zg#Df;cx$3&(rUF>x^yWF1_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 1150/1385] 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_VfKeoeZ7us;UXco+sa{Cu~?T%>VzV;6mlB8|EymeoKI&ivQB*DrhF4 zsS~h-!->UTkjoz94QIAw zFBRTwCMoV5umv{^wZ6D9<5X10r&h=3PCI>KBseVp_bv2?)>U&Il(i0&-wll28N2t- ze&3Wm2V;WV6?Z5h*=S!TW+_{J3IsErU$&EFMSL7bw|i&vUGHaff2SOYX}o|SI+Hdr zYX&I41FWQyesS7&<`{%vQsmblTx8qsCnYO!?wW{=E<$uI?#M>Go;v~p@0Utm`nMKT z9MO7Y-tR15gQSF|k)MfRgpmbd?-`WtDXY7FZc}J-N)&nm%n7M|UOB3~77ju1#q9j3 zYsE=fCEQ#xd;(TtP z)i|hfsaJdB?pwOu?yo4?%`vHRMHyhs)AQ5wYTlNymI&?Fx70hWM*6E$=oOUMc|GDb z7VmIJYW6h8#;Wtnt65@KXrzscSpVq!d=Ffb`v z90hbZb|x(BI8>Ptqrw!UDkIaF(1qnU!&lF)!7UH5;?w`qr}RDi9)3pPeBom3tDkRd zi*Cel{U+j?uBC(9mwz3N>A=3EE`cr*abWdo3g2706Q~vQFDZwE#U#VQ=hBaN6XCL7 z*1hK75{cwXskZU!hI5G`c`+wfxW_roS+j-3)UI5u#moL@K*p{q*GiaPc-%b!vVC7B z;?5m;pLCWPx1a@mfKh+QtKmp?P1O!FL35zUWDTkniU~JKD0n{buB;8*&C_#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ek&7D&2u0DTFg8kWGOx8WItUE6gp$p%5vJuJLh}2z*|J!U7VoTNk zMah|XH9!V(mH492s8iO%B_2nhW8o*GA(N_5a){a zvcA9SygxUvN?3rTWe@=rg!QGCHCV4-Py@Ic_w5M^uV2^a`#Lz+l~8uo8eFZNoGJ0f za~Jr|4=yv#(&vNtg)dALMF0gss7bA$N7S~32o_1GK1{w=icHHO0w@TrLsbO*^DD9jD=zMdQ3|Ig^u^8u zXFC(Bn6MbU*)hdhYkMru_rLm<{>Jw%GVa@#FbmNCIL%;^v5}`SAjklcS7G74@q-I@MglVymI(hUG))wASuig>ysW`ty$; z(_i}1DK3tA;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 1151/1385] 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&K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Ag|b8Y-sSe8vN@$S$yC0fAJQ`XT@T1XW2yK~&=qjQ4($b?<$cDdv#|bW{NmMxhj{ z22s{qK!JNh?%6x8VTtDF7TKIy)Q`KQ0f8FS{*k@^YD{#03Y+YwOQSIiOBLKUDScA^ zz(OB0^An*QuSt4sC|$)t)vo@Tb@ut!FV&3jLYsTG_gm6{Aa}f&-r{%e`A@4f*@o1Z zSjvoUi5B(1Gq8+ew&t40^TKR2JtNi~aSlpmsTeVDHSY5^ZoitjNo-K69t&uJB@YO+ zW$9?ob=HyBexgj_2rj`?4yqgia9k;{DX3f`{@z;tI2QBcZiQX@$i*3e&thr5_WaM8 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 1152/1385] 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(Y=6S0416{O@-xP-M@v z-o~Z`pW=ZNGz7SL%uG#x0c(ASAcXRc1YmeO(<8#7zwToUe!qw0I~LO^!A}p-hjXgM*t{ z9;J)K2b=kGfkJ!u!!ijqnSyvh-AJ~+}@IK*r~Wl+vmJ zCfK8~0VxB?Keb%6^}b{k>Db)Ny4Br^HoBP9CDzg&Kb*-yj#alTlIE&fyK4&`&UpAQ z4QusRmB>E6zx;h41b7*0xvpT8JNwtH1THFi?thKE^?wJj!T+rT000K4zEF7Qle5H$9#E)A@YEXdyFrLsD1gtM{?@_l_9(6lY-cr85#vW)>tWgfl_?>wFnB)z9@qy z=Bw0(F44O$QZk1vlj&?u@Ls=O)XMtRvcZzMRc2mknYY<-Sn_q``WnWcObaZpEU&EV z*pw+zf1lg3>zjAo;bK;tWu0wToF$NCuWsX}U_4uk3^<>M*xYS&B1Rk57if?HO-EdR zqLFtGTQ`ijFfz9vKHPW4jNFa~Y=+;*?OwnxygTxDJO9*;$lW(z{f^JF@}kN6nLn97 zlb>sK6rHhhDKNw_lKXdw|8JfDf3mm3_P)ULQwJ*R?YDVuZ}wkh&z|SwO%UG)WdRG( z0d{j4GxxS-j=NO8KTp=s`+i79%)NhZP+-E++4Yjl_?@00!Ky&kmpGkvacIAvgfCu3 zOJG~~@#X8M-$lm%nNIDJZ51S+RFzCMK;RK)(kSJE;~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kLFXl)c3(sA`6@>fv*0DS#55MBxH=adO0@b_H{+??m^W9*}DEkKV# zH;cAD{!anX%NKp+fu~Wm|GyrVsd5N}T^q=oeF^xCNr*vc7~l_gp--FeL$0ro8}_+P zO1>jEpIGD|`!v7=)a2xMIqm@9*X)Kh6qY!;qZC^@8dwcR^EcJ_O{})=UkM<21v~+5 zF9IdNoAiw|)oiZ#$2AMuh0d8T_}uFHe5{WLGyCWzD-LekBvq2DAd>zn_s^pz7Tu_+ zI{wcyAv@n2rmF%h{0?27np-QY+|l{L#v{aV?S72D-Bwg(B0wd~K8b`Jhp{km0`}tQ zwiPMVN+44goXbtU1-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 1153/1385] 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`#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{9$oabm0q;^F1@I zlM+$#K)B6rS8oY~8BIg~+6Izeeq-_W6dMBxlF$i;ke8G-orXBN8Qy*ey8%0K3z-Ac z>+GM;b<>=~*GUD8t7tRSgbKbFMM2COB$&%Se-bS6`<@X5!=vv9f4Y2cEC4}JOsqru zL+i^&JtGKxOD6OGA_#Plu@>g^xS9ptr~8JNE-?*Xll(1r-6MEcFO`U8IJD4$O~i3c)k`xOoAwf{gL k|NmqC4cYxaJ6gwH$fx6PU0Y$FAb>APkgQm#h_3Jd0&Dom4gdfE From d04d83bf4ba96110132e1eecc0eb89ea7884bccb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:52:39 -0500 Subject: [PATCH 1154/1385] 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^(hOhrYekZ5L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sj-6SNAd{(4lHcoOey5o!+OBiAJ8{+`7S(jQ+s<%9~lT& zglr43BAA5Ws9a&q5`j>(pOr{KZme|kAj?s8Uy3^=NA%-Qrv|v+Z zs=h z2ln~&z#r#+Quoo-24D?BR)v@!0wD73^W`B3pOdIvo;u4e%;Ak zlj0)`G$X8XK;BM2umjJpS?euqWa|km=|fKdhIf&C_DEhMfU!QPYug3`Lr>gzv~f~> z${4{}p?sPtK-fmOY+bX~TeNpCTTd{ih+#9yV5JcH1`T8IVXa|69e(77V|C5{s~m`I z4G{#d93~}{LZ~nx1WTSck>bG^d^VJRX3mfGQv;g%`1S2IJ0~N6P*}=};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 1155/1385] 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 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=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 1156/1385] 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=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h>)u364D6pVuT&i`23KPIVRLtTTu3 zm{BBKwwDZUw-EJjt+c%gS6^HmJk`o4H*?!L4k2VNr~E1M;!KT387nBjp_q-pzwEBX ztp$#dcKIMCXT5)@cV_!lMs?010%UhPtR=xzG-kQ@+#etiW3qwnH47t(Sl+J@M$j;x z8h2E0K}xS_sm7KOWut2|b)3T#eW}8Dvjz`g;xrWXTMsuZzped1hWFpu;b*Rij$9}C z=t83s-)4nGRohLpP3QdfgNb%C>Ec}YbM3T_DRV_B3Qf?Y-T%&y;AG%%;Wc{@TlpW~ zLY-K%z}Vf(l)8a3bPvTv7M}94vu?Ic_P;oLX0?C2BpeH4jQ;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 1157/1385] 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 z5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6B2h V* Date: Sun, 15 Jan 2023 22:53:58 -0500 Subject: [PATCH 1158/1385] 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*ZmhD?Ikpw{)_+L0546@iU9xt03<~ORor#2bwIOm zPCkB3&2;AO4sUNEA<XEIx_HwbZ=eF%y#8`z`runQP*OBT;^`-k${b>QUfLcNRFY$kP z{9iky3Z$j_FPG%)`o0Gx_HUxeu0F^KCq6G2Y;csrZ`d`G+QUfen*<$9nuBF&Uns;K zj5Xua$|KdI+T?<0mZy1ikCa!>)kmh16;(ELRA{ka(aM%8lV)bZ8fP3Ru2?fzo!?rs zQJcUH#hY;6I(PlswzYE-V0ul)xJ*^bGt;xsbm(qwr%*+46_ck%i`m&o z%vPcW6&oROt0<&^Q(f}zto0(@I7l!l6Ly@GnTtGI%oxZw!%VJw4>?fK3B{s!F~K&W zO`2CFEihwdtP5H}3+c}COiuMyK!m%-;j5R|X_#Aa7mFx%@rB%QTVEl$*ItHD5pPQ2 zep7SX>!~x95O#7l7FznOOsrCI>6BX3Je3!&pbEuNz<9ERD_e@siRR3Kfl4hgf;=7Q z(}4>+FrXp6vYf2CV(gp!=PkxoI%X7s)MjNTI{znVqG;^#mYBGiTVgVE78`%nnOWWS z__P`Mih=+0r)E~=x+)58v#H5zVdk>)oZ7ybB}rH9qnB~}3a+(WEu6M9ePGW3j#4#@ zBNUe@r5a`jHA4LxyA*$qXU(Af!R4H)qO|S|b2?myGe4PF${@~`<8ZZMT35SLxiE^G zQZQfIi(2CJrK(nY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M zL?mXYO1A>oZ3ax@`Ep8nXg}oZz9M;Wh4sHqprO^J3_9K1<1-9}${{~cu4(}rQ~$-Z zbiD4WS&-OZ!$yjW4&lldtNjrt)4-Rb$WTpp`x=B3U;QO!fB`qc8JqBn<)tq18YdiO}v{WC4rz#*mLPBC&7fdtv3NVmmA4wpBt+0tn0 zgeKgAucH8Yq#xgc>c}Q|6nc);8`=+kdAr+l{JZ@e?gzFSE*OGkDq$@V%&NLfcr*2W$`PP3QOGZLb Kyjs*K=zjocysa4k From a2034067c5e501634c4ce2d401f6aa9da83587a2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:55:40 -0500 Subject: [PATCH 1159/1385] 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>}%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HQ{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 1160/1385] 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 1161/1385] 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 1162/1385] 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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^VuUxXZfx1uS%briiVxA0oqh>&Rp Date: Mon, 16 Jan 2023 12:14:35 -0500 Subject: [PATCH 1163/1385] 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)*frd^iss1Vuk{brW8>c#MSVZvW812}JjsvdFJ zxTGnyMT7AvO%+2OKTe?A60_;uZUglAzPzG{IPuh5#mxg+OS&K8~)Bu z9Sd*bdm}B1mR_(f#XHQ>@ob7IW<$=C{ZjS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KeAwSJ_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 1164/1385] 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-Or4{TS=GFV?>Bo;B z_n*51uT7<1J7GQ&3<(T{Nrb1(iCF|f<&7_c8kRZq{L!QIV-zjrG5g;>jAqrP44DId zTV}AEQ+sc7`*L({-B^7()g)Bj;JK~m?MIy#mGD-v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Ha!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 1165/1385] 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 1166/1385] 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 1167/1385] 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 1168/1385] 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 1169/1385] 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 1170/1385] 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 1171/1385] 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 1172/1385] 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 1173/1385] 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 1174/1385] 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 1175/1385] 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 1176/1385] 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 1177/1385] 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 1178/1385] 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 1179/1385] 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 1180/1385] 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 1181/1385] 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 1182/1385] 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 1183/1385] 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 1184/1385] 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 1185/1385] 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 1186/1385] 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 1187/1385] 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 1188/1385] 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 1189/1385] 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 1190/1385] 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 1191/1385] 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 1192/1385] 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 1193/1385] 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 1194/1385] 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 1195/1385] 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 1196/1385] 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 1197/1385] 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 1198/1385] 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 1199/1385] 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 1200/1385] 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 1201/1385] 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 1202/1385] 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 1203/1385] 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 1204/1385] 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 1205/1385] 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!DHN0@xWu9H z37~XT5tz%UR z)N(@Wr+FrZkt-K=Ni#V~5IV~g(1u(qp_p#pU$V(t-v+R53q>*AgfP-5BpIety9O}2 z1tgJCAOiRlve$?Qk#P5LPNNdwkMZy>=>k**xfALzq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=ZWyFd7pTxy$CA70u%Q#9YfG#Ozob-Ps<40{=AzazuVks~!|CP0@2 zTJ9BKcJ=z8>+cKio3r)72VoxPaSY7Thd};BQM&Cun#Y2D^l8k)iXxOxmlFGb>C09y zjoIB8S&Nq%{GskpTqc5(bfb0|U+F!ekDVI~Y%yTzMNA-;lji*+QQ*X|#>V#Q#YYXt zmc-yEg}_|&0@mRw=DBL^??nNBuK;U@iChf4feGL7tQ~pNM#bk{OJ#h@eGX!s{i@(3 zXiRHDE{3Vl6&1lo&mF{zC~0*(Q&H|VpUwVE;fw*Oy-)?UHC%Dq?*%h72+N1LIU^#- zUmW?I7P_VbSg1>QWgRd8eCo$~9tff0g4?c$9O)tfv|{R|FWME&gdLs|i|akvjfn@X zD#>i=cWYpTjr2(C|NS~dm~rb=ycGFro;ng}QE@?fDgy!mYPIFyLB z!vS|C*Df`t$l8*Qa*UL-og&q-6r8ivtIxv*EPHu$Y7}b$aj@syQfoIbjQL8{3%(Nz z>zSLlF+A}-eWq33h)sk^|7Y)^>ANqUJ?FRhlb@>5+WV_?3EtTvOQXK$ML>rs^}BIj0L2ta_L*#GuS63) z?TyI9Q$=IvU8Cbh#HaLN@7vNJJ6b^kH8JP$mVv8PiLd;&4yvUklg}gOvZlS zydw_=#NO`S7q7bi@`*K&6GiLu9(aqbXxQNkfVLO5*LhaKc-1vajYL|tW)&%X5)%B- z%-V86ddHit6FL`EF*2MwwyJ$7MH6UF?ibNbe=;n5TVft63#B$;h&yEVhVMvN0zE3| zC$AfP?yKK*EIkj^zhHKzlVkugZ#NT|R6EF3u`%#QM!Lu9u4{2cKqG_%Vff&M4HtZB OV|9-rFHVs{mGX|rqg5RM diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh deleted file mode 100644 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 1206/1385] 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 1207/1385] 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 1208/1385] 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 1209/1385] 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 1210/1385] 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 1211/1385] 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 1212/1385] 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 1213/1385] 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 1214/1385] 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 1215/1385] 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 1216/1385] 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 1217/1385] 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 1218/1385] 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 1219/1385] 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 1220/1385] 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 1221/1385] 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 1222/1385] 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 1223/1385] 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 1224/1385] 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 1225/1385] 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 1226/1385] 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 1227/1385] 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 1228/1385] 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 1229/1385] 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 1230/1385] 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 1231/1385] 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 1232/1385] 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 1233/1385] 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 1234/1385] 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 1235/1385] 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 1236/1385] 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 1237/1385] 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 1238/1385] 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 1239/1385] 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 1240/1385] 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 1241/1385] 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 1242/1385] 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 1243/1385] 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 1244/1385] 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 1245/1385] 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 1246/1385] 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 1247/1385] 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 1248/1385] 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 1249/1385] 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 1250/1385] 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 1251/1385] 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 1252/1385] 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 1253/1385] 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 1254/1385] 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 1255/1385] 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 1256/1385] 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 1257/1385] 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 1258/1385] 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 1259/1385] 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 1260/1385] 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 1261/1385] 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 1262/1385] 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 1263/1385] 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 1264/1385] 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 1265/1385] 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 1266/1385] 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 1267/1385] 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 1268/1385] 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 1269/1385] 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 1270/1385] 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 1271/1385] 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 1272/1385] 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 1273/1385] 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 1274/1385] 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 1275/1385] 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 1276/1385] 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 1277/1385] 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 1278/1385] 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 1279/1385] 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 1280/1385] 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 1281/1385] 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 1282/1385] 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 1283/1385] 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 1284/1385] 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 1285/1385] 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 1286/1385] 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 1287/1385] 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 1288/1385] 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 1289/1385] 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 1290/1385] 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 1291/1385] 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 1292/1385] 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 1293/1385] 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 1294/1385] 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 1295/1385] 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 1296/1385] 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 1297/1385] 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 1298/1385] 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 1299/1385] 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 1300/1385] 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 1301/1385] 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 1302/1385] 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 1303/1385] 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 1304/1385] 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 1305/1385] 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 1306/1385] 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 1307/1385] 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 1308/1385] 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 1309/1385] 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 1310/1385] 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 1311/1385] 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 1312/1385] 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 1313/1385] 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 1314/1385] 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 1315/1385] 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 1316/1385] 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 1317/1385] 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 1318/1385] 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 1319/1385] 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 1320/1385] 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 1321/1385] 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 1322/1385] 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 1323/1385] 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 1324/1385] 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 1325/1385] 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 1326/1385] 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 1327/1385] 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 1328/1385] 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 1329/1385] 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 1330/1385] 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 1331/1385] 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 1332/1385] 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 1333/1385] 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 1334/1385] 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 1335/1385] 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 1336/1385] 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 1337/1385] 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 1338/1385] 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 1339/1385] 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 1340/1385] 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 1341/1385] 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 1342/1385] 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 1343/1385] 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 1344/1385] 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 1345/1385] 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 1346/1385] 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 1347/1385] 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 1348/1385] 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 1349/1385] 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 1350/1385] 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 1351/1385] 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 1352/1385] 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 1353/1385] 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 1354/1385] 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 1355/1385] 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 1356/1385] 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 1357/1385] 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 1358/1385] 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 1359/1385] 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 1360/1385] 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 1361/1385] 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 1362/1385] 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 1363/1385] 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 1364/1385] 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 1365/1385] 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 1366/1385] 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 1367/1385] 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 1368/1385] 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 1369/1385] 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 1370/1385] 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 1371/1385] 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 1372/1385] 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 1373/1385] 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 1374/1385] 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 1375/1385] 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 1376/1385] 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 1377/1385] 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 1378/1385] 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 1379/1385] 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 1380/1385] 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 1381/1385] 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 1382/1385] 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 1383/1385] 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 1384/1385] 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 1385/1385] 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

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_5#A6Su%>%YnH}v@#yKP>g-ilv3&p~AS zmU^lTY%w+*DPD7+P1c&ShG)NuN7|&THd`2n7RIfcMU?5cC-IZ_iu~BANE%T#7r^q5 zi0qc&zH}~42hN&j8qAYbD`PPJ{&@Eu7+eLcLk@B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