From 5478baa23a4e07dd20d141dd29a3773c8e9a3212 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:12:28 -0400 Subject: [PATCH 01/46] Update debian-v3.sh --- ct/debian-v3.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ct/debian-v3.sh b/ct/debian-v3.sh index f48e55fb..e5b98317 100644 --- a/ct/debian-v3.sh +++ b/ct/debian-v3.sh @@ -302,11 +302,6 @@ export PCT_OPTIONS=" " 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 - echo -e "${RD}Some applications may not work properly due to ZFS not supporting 'fallocate'.${CL}" -fi - msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From 2a5da896eab7e3adccac8f9fe23d095811757bf7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:14:05 -0400 Subject: [PATCH 02/46] Update docker-v3.sh --- ct/docker-v3.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ct/docker-v3.sh b/ct/docker-v3.sh index b11e1921..46da64aa 100644 --- a/ct/docker-v3.sh +++ b/ct/docker-v3.sh @@ -302,10 +302,6 @@ export PCT_OPTIONS=" " 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 - echo -e "${RD}Some applications may not work properly due to ZFS not supporting 'fallocate'.${CL}" -fi LXC_CONFIG=/etc/pve/lxc/${CTID}.conf cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a From b0bc05068399c10ec33d4f552961c975da48d5b1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:14:56 -0400 Subject: [PATCH 03/46] Update esphome-v3.sh --- ct/esphome-v3.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ct/esphome-v3.sh b/ct/esphome-v3.sh index 456c7549..fbfac335 100644 --- a/ct/esphome-v3.sh +++ b/ct/esphome-v3.sh @@ -302,11 +302,6 @@ export PCT_OPTIONS=" " 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 - echo -e "${RD}Some applications may not work properly due to ZFS not supporting 'fallocate'.${CL}" -fi - msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From 28d1481360a73063457e97558e0f18683c697ede Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:15:42 -0400 Subject: [PATCH 04/46] Update homeassistant-v3.sh --- ct/homeassistant-v3.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ct/homeassistant-v3.sh b/ct/homeassistant-v3.sh index 061d494a..c8242a8c 100644 --- a/ct/homeassistant-v3.sh +++ b/ct/homeassistant-v3.sh @@ -302,10 +302,6 @@ export PCT_OPTIONS=" " 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 - echo -e "${RD}Some applications may not work properly due to ZFS not supporting 'fallocate'.${CL}" -fi LXC_CONFIG=/etc/pve/lxc/${CTID}.conf cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a From f4c168033ef80caa181b9706f9fbb9cc29914f3e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:16:39 -0400 Subject: [PATCH 05/46] Update photoprism-v3.sh --- ct/photoprism-v3.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ct/photoprism-v3.sh b/ct/photoprism-v3.sh index b6c970e8..67547300 100644 --- a/ct/photoprism-v3.sh +++ b/ct/photoprism-v3.sh @@ -302,11 +302,6 @@ export PCT_OPTIONS=" " 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 - echo -e "${RD}Some applications may not work properly due to ZFS not supporting 'fallocate'.${CL}" -fi - msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From 3acbd66d5d371de875d1edd617658c161e3307c9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:17:55 -0400 Subject: [PATCH 06/46] Update podman-homeassistant-v3.sh --- ct/podman-homeassistant-v3.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ct/podman-homeassistant-v3.sh b/ct/podman-homeassistant-v3.sh index 09fb0b11..75893d4b 100644 --- a/ct/podman-homeassistant-v3.sh +++ b/ct/podman-homeassistant-v3.sh @@ -307,10 +307,6 @@ export PCT_OPTIONS=" " 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 - echo -e "${RD}Some applications may not work properly due to ZFS not supporting 'fallocate'.${CL}" -fi LXC_CONFIG=/etc/pve/lxc/${CTID}.conf cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a From f9f58b6a0f6847484768f8d0a6e65984d9e7e8fe Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:18:47 -0400 Subject: [PATCH 07/46] Update technitiumdns-v3.sh --- ct/technitiumdns-v3.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ct/technitiumdns-v3.sh b/ct/technitiumdns-v3.sh index fe686355..5a466254 100644 --- a/ct/technitiumdns-v3.sh +++ b/ct/technitiumdns-v3.sh @@ -302,11 +302,6 @@ export PCT_OPTIONS=" " 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 - echo -e "${RD}Some applications may not work properly due to ZFS not supporting 'fallocate'.${CL}" -fi - msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From b542207982e79b62dcdd02bdf82179735c6b6ac6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:20:25 -0400 Subject: [PATCH 08/46] Update zigbee2mqtt-v3.sh --- ct/zigbee2mqtt-v3.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ct/zigbee2mqtt-v3.sh b/ct/zigbee2mqtt-v3.sh index 9833a07d..c1da0388 100644 --- a/ct/zigbee2mqtt-v3.sh +++ b/ct/zigbee2mqtt-v3.sh @@ -275,6 +275,7 @@ function start_script() { fi; } +PVE_CHECK start_script if [ "$CT_TYPE" == "1" ]; then @@ -302,11 +303,6 @@ export PCT_OPTIONS=" " 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 - echo -e "${RD}Some applications may not work properly due to ZFS not supporting 'fallocate'.${CL}" -fi - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a From 3c6a3846aea9dd6087f7b6864a1e5f7f2c9d5d6d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:21:29 -0400 Subject: [PATCH 09/46] Update zwavejs2mqtt-v3.sh --- ct/zwavejs2mqtt-v3.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ct/zwavejs2mqtt-v3.sh b/ct/zwavejs2mqtt-v3.sh index dbc2e72d..12e5d42c 100644 --- a/ct/zwavejs2mqtt-v3.sh +++ b/ct/zwavejs2mqtt-v3.sh @@ -275,6 +275,7 @@ function start_script() { fi; } +PVE_CHECK start_script if [ "$CT_TYPE" == "1" ]; then @@ -302,10 +303,6 @@ export PCT_OPTIONS=" " 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 - echo -e "${RD}Some applications may not work properly due to ZFS not supporting 'fallocate'.${CL}" -fi LXC_CONFIG=/etc/pve/lxc/${CTID}.conf cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a From c9bb46536db6d41d018ce6e95bb4b3f795f92353 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:27:34 -0400 Subject: [PATCH 10/46] Create adguard-v3.sh --- ct/adguard-v3.sh | 315 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 315 insertions(+) create mode 100644 ct/adguard-v3.sh diff --git a/ct/adguard-v3.sh b/ct/adguard-v3.sh new file mode 100644 index 00000000..aa22f949 --- /dev/null +++ b/ct/adguard-v3.sh @@ -0,0 +1,315 @@ +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob + +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\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 ' ') +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 "${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}2GB${CL}" + DISK_SIZE="2" + echo -e "${DGN}Using ${BGN}1vCPU${CL}" + CORE_COUNT="1" + echo -e "${DGN}Using ${BGN}512MiB${CL}${DGN} RAM${CL}" + RAM_SIZE="512" + 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: 2Gb " + 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}" +echo -e " ${CM}${CL} \r" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${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}" +echo -e " ${CM}${CL} \r" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}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 CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${YW}Enter a Static IP 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" + echo -e "${YW}Enter a Gateway IP, 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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=vmbr0,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + +msg_info "Starting LXC Container" +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}') + +msg_ok "Completed Successfully!\n" From 6593b554b6e9ade9a078919e115643c3c36c9526 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:31:08 -0400 Subject: [PATCH 11/46] Update adguard-install.sh --- setup/adguard-install.sh | 73 ++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 41 deletions(-) diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index 91e09ab3..f28f4425 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -1,38 +1,30 @@ -#!/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" -} - +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob +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}" RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" -echo -en "${GN} Setting up Container OS... " +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 @@ -45,27 +37,26 @@ while [ "$(hostname -I)" = "" ]; do exit 1 fi done -echo -e "${CM}${CL} \r" -echo -en "${GN} Network Connected: ${BL}$(hostname -I)${CL} " -echo -e "${CM}${CL} \r" +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" -echo -en "${GN} Updating Container OS... " +msg_info "Updating Container OS" apt update &>/dev/null apt-get -qqy upgrade &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Updated Container OS" -echo -en "${GN} Installing Dependencies... " +msg_info "Installing Dependencies" apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Installed Dependencies" -echo -en "${GN} Installing AdGuard Home... " +msg_info "Installing AdGuard Home" curl -sSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Installed AdGuard Home" PASS=$(grep -w "root" /etc/shadow | cut -b6); if [[ $PASS != $ ]]; then -echo -en "${GN} Customizing Container... " +msg_info "Customizing Container" rm /etc/motd rm /etc/update-motd.d/10-uname touch ~/.hushlogin @@ -78,11 +69,11 @@ ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,3840 EOF systemctl daemon-reload systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -echo -e "${CM}${CL} \r" +msg_ok "Customized Container" fi - -echo -en "${GN} Cleanup... " + +msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* /var/lib/apt/lists/* -echo -e "${CM}${CL} \n" +msg_ok "Cleaned" From d00572379425f9a5e4fbd7db9f640ad1f843653a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:38:24 -0400 Subject: [PATCH 12/46] Create homebridge-v3.sh --- ct/homebridge-v3.sh | 315 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 315 insertions(+) create mode 100644 ct/homebridge-v3.sh diff --git a/ct/homebridge-v3.sh b/ct/homebridge-v3.sh new file mode 100644 index 00000000..826573bc --- /dev/null +++ b/ct/homebridge-v3.sh @@ -0,0 +1,315 @@ +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob + +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\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 ' ') +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 msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + + if [[ $PVE != 1 ]]; then + 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}4GB${CL}" + DISK_SIZE="4" + echo -e "${DGN}Using ${BGN}1vCPU${CL}" + CORE_COUNT="1" + echo -e "${DGN}Using ${BGN}1024MiB${CL}${DGN} RAM${CL}" + RAM_SIZE="1024" + 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: 4Gb " + 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}" +echo -e " ${CM}${CL} \r" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${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}" +echo -e " ${CM}${CL} \r" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}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}" +echo -e " ${CM}${CL} \n" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${YW}Enter a Static IP 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" + echo -e "${YW}Enter a Gateway IP, 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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=vmbr0,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + +msg_info "Starting LXC Container" +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}') + +msg_ok "Completed Successfully!\n" +echo -e "Homebridge should be reachable by going to the following URL. + ${BL}http://${IP}:8581${CL} \n" From f5efbec80270174bf1dd9502479aed477bdc5088 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:39:47 -0400 Subject: [PATCH 13/46] Update adguard-v3.sh --- ct/adguard-v3.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/adguard-v3.sh b/ct/adguard-v3.sh index aa22f949..5deca39f 100644 --- a/ct/adguard-v3.sh +++ b/ct/adguard-v3.sh @@ -313,3 +313,5 @@ 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}') 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 95363971aa01c620ce2cc6c1a576a1d8c1e6611b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:40:32 -0400 Subject: [PATCH 14/46] Rename adguard.sh to adguard-v2.sh --- ct/{adguard.sh => adguard-v2.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{adguard.sh => adguard-v2.sh} (100%) diff --git a/ct/adguard.sh b/ct/adguard-v2.sh similarity index 100% rename from ct/adguard.sh rename to ct/adguard-v2.sh From 7a7f59a5de965556a34dcb720a352b645bc26972 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:41:05 -0400 Subject: [PATCH 15/46] Rename homebridge.sh to homebridge-v2.sh --- ct/{homebridge.sh => homebridge-v2.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{homebridge.sh => homebridge-v2.sh} (100%) diff --git a/ct/homebridge.sh b/ct/homebridge-v2.sh similarity index 100% rename from ct/homebridge.sh rename to ct/homebridge-v2.sh From 06b94c09e303162718b5f30167df466452213ded Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:43:33 -0400 Subject: [PATCH 16/46] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ad40af0a..3a0c8a90 100644 --- a/README.md +++ b/README.md @@ -271,17 +271,17 @@ ________________________________________________________________________________
- Homebridge LXC + 🔸Homebridge LXC

Homebridge LXC

Homebridge 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 (V2). +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.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homebridge-v3.sh)" ```

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

@@ -1138,16 +1138,16 @@ ________________________________________________________________________________
- AdGuard Home LXC + 🔸AdGuard Home LXC

AdGuard Home LXC

-To create a new Proxmox AdGuard Home LXC, run the following in the Proxmox Shell (V2). +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.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/adguard-v3.sh)" ```

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

From 347269396e1920e4c96e02dbd94d168eee992cd7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:49:52 -0400 Subject: [PATCH 17/46] Create uptimekuma-v3.sh --- ct/uptimekuma-v3.sh | 317 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 317 insertions(+) create mode 100644 ct/uptimekuma-v3.sh diff --git a/ct/uptimekuma-v3.sh b/ct/uptimekuma-v3.sh new file mode 100644 index 00000000..18be8995 --- /dev/null +++ b/ct/uptimekuma-v3.sh @@ -0,0 +1,317 @@ +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob + +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\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 ' ') +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 + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + + if [[ $PVE != 1 ]]; then + 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}2GB${CL}" + DISK_SIZE="2" + echo -e "${DGN}Using ${BGN}1vCPU${CL}" + CORE_COUNT="1" + echo -e "${DGN}Using ${BGN}512MiB${CL}${DGN} RAM${CL}" + RAM_SIZE="512" + 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: 2Gb " + 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}" +echo -e " ${CM}${CL} \r" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${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}" +echo -e " ${CM}${CL} \r" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}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 CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${YW}Enter a Static IP 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" + echo -e "${YW}Enter a Gateway IP, 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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=vmbr0,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + +msg_info "Starting LXC Container" +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}') + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3001${CL}\n" From 27e95b0cc638e4428a81b46a1591c4101d07eeb1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:50:49 -0400 Subject: [PATCH 18/46] Update uptimekuma-v3.sh --- ct/uptimekuma-v3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/uptimekuma-v3.sh b/ct/uptimekuma-v3.sh index 18be8995..af05bb94 100644 --- a/ct/uptimekuma-v3.sh +++ b/ct/uptimekuma-v3.sh @@ -29,7 +29,7 @@ function header_info { echo -e "${DGN} _ _ _ _ _ __ | | | | | | (_) | |/ / - | | | |_ __ | |_ _ _ __ ___ ___ | ' /_ _ _ __ ___ __ _ + | | | |_v3_ | |_ _ _ __ ___ ___ | ' /_ _ _ __ ___ __ _ | | | | _ \| __| | _ _ \ / _ \ | <| | | | _ _ \ / _ | | |__| | |_) | |_| | | | | | | __/ | . \ |_| | | | | | | (_| | \____/| .__/ \__|_|_| |_| |_|\___| |_|\_\__,_|_| |_| |_|\__,_| From 5c5dc2337cc430312d9e64e96b7278045a4a78a3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:51:23 -0400 Subject: [PATCH 19/46] Rename uptimekuma.sh to uptimekuma-v2.sh --- ct/{uptimekuma.sh => uptimekuma-v2.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{uptimekuma.sh => uptimekuma-v2.sh} (100%) diff --git a/ct/uptimekuma.sh b/ct/uptimekuma-v2.sh similarity index 100% rename from ct/uptimekuma.sh rename to ct/uptimekuma-v2.sh From a4234a3a4294d4cdcf44c4ff9d0f809cfe63dcf9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:52:33 -0400 Subject: [PATCH 20/46] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3a0c8a90..9f89185d 100644 --- a/README.md +++ b/README.md @@ -1174,16 +1174,14 @@ ________________________________________________________________________________ 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 (V2). +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.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/uptimekuma-v3.sh)" ```

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

-After the script completes, If you're dissatisfied with the default settings, click on the LXC, then on the **_Resources_** tab and change the settings to what you desire. Changes are immediate. - **Uptime Kuma Interface - IP:3001** ⚙️ **To Update** From 569096cc08024e9607d4355ec05a44f5e638245d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 06:55:06 -0400 Subject: [PATCH 21/46] Update CHANGELOG.MD --- CHANGELOG.MD | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 663f60b0..e4a4df19 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -5,12 +5,23 @@ All notable changes to this project will be documented in this file. ### ⚠️ [IMPORTANT NOTICE](https://github.com/tteck/Proxmox/issues/71#issue-1169207591) +## 2022-04-18 + +### Changed + +- **Adguard LXC** + - New [V3 Install Script](https://github.com/tteck/Proxmox/issues/162) +- **Homebridge LXC** + - New V3 Install Script +- **Uptime Kuma LXC** + - New V3 Install Script + ## 2022-04-17 ### Changed - **Zigbee2MQTT LXC** - - New [V3 Install Script](https://github.com/tteck/Proxmox/issues/162) + - New V3 Install Script - **Zwavejs2MQTT LXC** - New V3 Install Script - **ESPHome LXC** From 4fcd2fff62b991793750403fb6429c88d1616e96 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:06:25 -0400 Subject: [PATCH 22/46] Create vaultwarden-v3.sh --- ct/vaultwarden-v3.sh | 315 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 315 insertions(+) create mode 100644 ct/vaultwarden-v3.sh diff --git a/ct/vaultwarden-v3.sh b/ct/vaultwarden-v3.sh new file mode 100644 index 00000000..8149e55c --- /dev/null +++ b/ct/vaultwarden-v3.sh @@ -0,0 +1,315 @@ +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob + +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\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 ' ') +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 / / | | | | | + \ \ / /_ _ _ _| | |___ ____ _ _ __ __| | ___ _ __ + \ \/ / _ | | | | | __\ \ /\ / / _ | __/ _ |/ _ \ _ \ + \ / (_| | |_| | | |_ \ 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}8GB${CL}" + DISK_SIZE="8" + echo -e "${DGN}Using ${BGN}4vCPU${CL}" + CORE_COUNT="4" + echo -e "${DGN}Using ${BGN}4096MiB${CL}${DGN} RAM${CL}" + RAM_SIZE="4096" + 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: 8Gb " + 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}" +echo -e " ${CM}${CL} \r" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" + echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 4 " + read CORE_COUNT + if [ -z $CORE_COUNT ]; then CORE_COUNT="4"; 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}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 CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${YW}Enter a Static IP 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" + echo -e "${YW}Enter a Gateway IP, 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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=vmbr0,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + +msg_info "Starting LXC Container" +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}') + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" From bff567e4f13b6daa710339b4b1ffc2bdd287ab7e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:07:07 -0400 Subject: [PATCH 23/46] Rename vaultwarden.sh to vaultwarden-v2.sh --- ct/{vaultwarden.sh => vaultwarden-v2.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{vaultwarden.sh => vaultwarden-v2.sh} (100%) diff --git a/ct/vaultwarden.sh b/ct/vaultwarden-v2.sh similarity index 100% rename from ct/vaultwarden.sh rename to ct/vaultwarden-v2.sh From 8cb2ec9433b40e3dc4ec7a5b7809b072dd994d7d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:16:55 -0400 Subject: [PATCH 24/46] Update vaultwarden-install.sh --- setup/vaultwarden-install.sh | 93 ++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 51 deletions(-) diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index ce9d60e2..71f3f34f 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -1,38 +1,30 @@ -#!/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" -} - +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob +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}" RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" -echo -en "${GN} Setting up Container OS... " +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 @@ -45,16 +37,15 @@ while [ "$(hostname -I)" = "" ]; do exit 1 fi done -echo -e "${CM}${CL} \r" -echo -en "${GN} Network Connected: ${BL}$(hostname -I)${CL} " -echo -e "${CM}${CL} \r" +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" -echo -en "${GN} Updating Container OS... " -apt-get update &>/dev/null +msg_info "Updating Container OS" +apt update &>/dev/null apt-get -qqy upgrade &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Updated Container OS" -echo -en "${GN} Installing Dependencies... " +msg_info "Installing Dependencies" apt-get update &>/dev/null apt-get -qqy install \ git \ @@ -67,36 +58,36 @@ apt-get -qqy install \ libssl-dev \ curl \ sudo &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Installed Dependencies" -echo -en "${GN} Installing Build Essentials... " +msg_info "Installing Build Essentials" apt-get install -y build-essential &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Installed Build Essentials" -echo -en "${GN} Installing Rust... " +msg_info "Installing Rust" 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 "${CM}${CL} \r" +msg_ok "Installed Rust" -echo -en "${GN} Installing Node.js... " +msg_info "Installing Node.js" 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 "${CM}${CL} \r" +msg_ok "Installed Node.js" -echo -en "${GN} Building Vaultwarden (Patience)... " +msg_info "Building Vaultwarden (Patience)" 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 "${CM}${CL} \r" +msg_ok "Built Vaultwarden" -echo -en "${GN} Building Web-Vault... " +msg_info "Building Web-Vault" 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 @@ -110,9 +101,9 @@ npm run --silent dist:oss:selfhost &>/dev/null cp -a build ../web-vault &>/dev/null cd .. mkdir data -echo -e "${CM}${CL} \r" +msg_ok "Built Web-Vault" -echo -en "${GN} Create Systemd Service... " +msg_info "Creating Service" cp ../../.env.template /etc/vaultwarden.env &>/dev/null cp vaultwarden /usr/bin/vaultwarden &>/dev/null chmod +x /usr/bin/vaultwarden &>/dev/null @@ -145,11 +136,11 @@ WantedBy=multi-user.target" > $service_path systemctl daemon-reload systemctl enable vaultwarden.service &>/dev/null systemctl start vaultwarden.service &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6); if [[ $PASS != $ ]]; then -echo -en "${GN} Customizing Container... " +msg_info "Customizing Container" rm /etc/motd rm /etc/update-motd.d/10-uname touch ~/.hushlogin @@ -162,11 +153,11 @@ ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,3840 EOF systemctl daemon-reload systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -echo -e "${CM}${CL} \r" +msg_ok "Customized Container" fi -echo -en "${GN} Cleanup... " +msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* /var/lib/apt/lists/* -echo -e "${CM}${CL} \n" +msg_ok "Cleaned" From 8d2c5d0ba7bf134b84f51e353d700743dfcfdc8b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:18:22 -0400 Subject: [PATCH 25/46] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9f89185d..f21ca091 100644 --- a/README.md +++ b/README.md @@ -1468,7 +1468,7 @@ ________________________________________________________________________________
- Vaultwarden LXC + 🔸Vaultwarden LXC

@@ -1477,7 +1477,7 @@ ________________________________________________________________________________ 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.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/vaultwarden-v3.sh)" ``` ⚠️ Vaultwarden needs to be behind a proxy (Nginx Proxy Manager) to obtain HTTPS and to allow clients to connect. From da8f7d7873dfa260ce3d587e7936f3eab4faa6e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:19:35 -0400 Subject: [PATCH 26/46] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index e4a4df19..d593a664 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -15,6 +15,8 @@ All notable changes to this project will be documented in this file. - New V3 Install Script - **Uptime Kuma LXC** - New V3 Install Script +- **Vaultwarden LXC** + - New V3 Install Script ## 2022-04-17 From 5aec95f9835a6248c2d2f26fe1fd1d1b4d69f0d9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:26:58 -0400 Subject: [PATCH 27/46] Create motioneye-v3.sh --- ct/motioneye-v3.sh | 315 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 315 insertions(+) create mode 100644 ct/motioneye-v3.sh diff --git a/ct/motioneye-v3.sh b/ct/motioneye-v3.sh new file mode 100644 index 00000000..8a76ccf9 --- /dev/null +++ b/ct/motioneye-v3.sh @@ -0,0 +1,315 @@ +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob + +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\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 ' ') +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 msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + + if [[ $PVE != 1 ]]; then + 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}8GB${CL}" + DISK_SIZE="8" + echo -e "${DGN}Using ${BGN}2vCPU${CL}" + CORE_COUNT="2" + echo -e "${DGN}Using ${BGN}2048MiB${CL}${DGN} RAM${CL}" + RAM_SIZE="2048" + 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: 8Gb " + 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}" +echo -e " ${CM}${CL} \r" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${YW}Enter a Static IP 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" + echo -e "${YW}Enter a Gateway IP, 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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=vmbr0,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + +msg_info "Starting LXC Container" +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}') + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8765${CL} \n" From 5fa17902d8ca3ca3169e8f7caf03d5578ccc8b9c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:27:24 -0400 Subject: [PATCH 28/46] Rename motioneye.sh to motioneye-v2.sh --- ct/{motioneye.sh => motioneye-v2.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{motioneye.sh => motioneye-v2.sh} (100%) diff --git a/ct/motioneye.sh b/ct/motioneye-v2.sh similarity index 100% rename from ct/motioneye.sh rename to ct/motioneye-v2.sh From 064d3d54bfa47c16822caf5116078f7e3279574e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:33:08 -0400 Subject: [PATCH 29/46] Update motioneye-install.sh --- setup/motioneye-install.sh | 90 ++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 48 deletions(-) diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index c1564884..159baf93 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -1,38 +1,30 @@ -#!/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" -} - +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob +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}" RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" -echo -en "${GN} Setting up Container OS... " +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 @@ -45,16 +37,18 @@ while [ "$(hostname -I)" = "" ]; do exit 1 fi done -echo -e "${CM}${CL} \r" -echo -en "${GN} Network Connected: ${BL}$(hostname -I)${CL} " -echo -e "${CM}${CL} \r" +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" -echo -en "${GN} Installing Dependencies... " -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo &>/dev/null -echo -e "${CM}${CL} \r" +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" echo -en "${GN} Installing Motion... " apt-get install motion -y &>/dev/null @@ -62,36 +56,36 @@ echo -en "${GN} Installing Motion... " systemctl disable motion &>/dev/null echo -e "${CM}${CL} \r" -echo -en "${GN} Installing FFmpeg... " +msg_info "Installing FFmpeg" apt-get install ffmpeg v4l-utils -y &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Installed FFmpeg" -echo -en "${GN} Installing Python... " +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 - echo -e "${CM}${CL} \r" + msg_ok "Installed Python" -echo -en "${GN} Installing MotionEye... " +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 -echo -e "${CM}${CL} \r" +msg_ok "Installed MotionEye" -echo -en "${GN} Creating Service file motioneye.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 -echo -e "${CM}${CL} \r" +msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6); if [[ $PASS != $ ]]; then -echo -en "${GN} Customizing Container... " +msg_info "Customizing Container" rm /etc/motd rm /etc/update-motd.d/10-uname touch ~/.hushlogin @@ -104,11 +98,11 @@ ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,3840 EOF systemctl daemon-reload systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -echo -e "${CM}${CL} \r" +msg_ok "Customized Container" fi -echo -en "${GN} Cleanup... " +msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* /var/lib/apt/lists/* -echo -e "${CM}${CL} \n" +msg_ok "Cleaned" From 7a76669ebfbb0140e9a4df883d8502f3e53e007d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:34:53 -0400 Subject: [PATCH 30/46] Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f21ca091..444b0d78 100644 --- a/README.md +++ b/README.md @@ -1326,22 +1326,20 @@ ________________________________________________________________________________
- MotionEye VMS LXC + 🔸MotionEye VMS LXC

MotionEye VMS LXC

-To create a new Proxmox MotionEye VMS LXC, run the following in the Proxmox Shell (V2). +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.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/motioneye-v3.sh)" ```

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

-After the script completes, If you're dissatisfied with the default settings, click on the LXC, then on the **_Resources_** tab and change the settings to what you desire. Changes are immediate. - **MotionEye Interface - IP:8765** ⚙️ **Initial Login** From bb89c7566474aaa5e9ed7f4ada59fc2e7ef7c6f4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:35:53 -0400 Subject: [PATCH 31/46] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index d593a664..b885e996 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -17,6 +17,8 @@ All notable changes to this project will be documented in this file. - New V3 Install Script - **Vaultwarden LXC** - New V3 Install Script +- **Motioneye LXC** + - New V3 Install Script ## 2022-04-17 From 5f0d4250cdb307c6d9581824d97ab0c4e08c8c4e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:43:00 -0400 Subject: [PATCH 32/46] Create nginx-proxy-manager-v3.sh --- ct/nginx-proxy-manager-v3.sh | 315 +++++++++++++++++++++++++++++++++++ 1 file changed, 315 insertions(+) create mode 100644 ct/nginx-proxy-manager-v3.sh diff --git a/ct/nginx-proxy-manager-v3.sh b/ct/nginx-proxy-manager-v3.sh new file mode 100644 index 00000000..aab3e5c5 --- /dev/null +++ b/ct/nginx-proxy-manager-v3.sh @@ -0,0 +1,315 @@ +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob + +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\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 ' ') +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 msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + + if [[ $PVE != 1 ]]; then + 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}3GB${CL}" + DISK_SIZE="3" + echo -e "${DGN}Using ${BGN}1vCPU${CL}" + CORE_COUNT="1" + echo -e "${DGN}Using ${BGN}1024MiB${CL}${DGN} RAM${CL}" + RAM_SIZE="1024" + 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: 3Gb " + 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}" +echo -e " ${CM}${CL} \r" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${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}" +echo -e " ${CM}${CL} \r" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}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}" +echo -e " ${CM}${CL} \n" +sleep 1 +clear +header_info + echo -e "${RD}Using Advanced Settings${CL}" + echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" + echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" + echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" + echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" + echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${YW}Enter a Static IP 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" + echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" + echo -e "${YW}Enter a Gateway IP, 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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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}" + echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" + echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${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=vmbr0,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + +msg_info "Starting LXC Container" +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}') + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:81${CL} \n" From 4f2aa20a73130648ed0866bb0d7d3fe22a4d1918 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 07:43:32 -0400 Subject: [PATCH 33/46] Rename nginx-proxy-manager.sh to nginx-proxy-manager-v2.sh --- ct/{nginx-proxy-manager.sh => nginx-proxy-manager-v2.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{nginx-proxy-manager.sh => nginx-proxy-manager-v2.sh} (100%) diff --git a/ct/nginx-proxy-manager.sh b/ct/nginx-proxy-manager-v2.sh similarity index 100% rename from ct/nginx-proxy-manager.sh rename to ct/nginx-proxy-manager-v2.sh From 9b183c7bd8f171ede2b6f419db3628bdc5f26277 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:00:11 -0400 Subject: [PATCH 34/46] Update nginx-proxy-manager-install.sh --- setup/nginx-proxy-manager-install.sh | 113 ++++++++++++--------------- 1 file changed, 52 insertions(+), 61 deletions(-) diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index 3708a726..47d65c37 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -1,38 +1,30 @@ -#!/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" -} - +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob +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}" RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" -echo -en "${GN} Setting up Container OS... " +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 @@ -45,16 +37,15 @@ while [ "$(hostname -I)" = "" ]; do exit 1 fi done -echo -e "${CM}${CL} \r" -echo -en "${GN} Network Connected: ${BL}$(hostname -I)${CL} " -echo -e "${CM}${CL} \r" +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" -echo -en "${GN} Updating Container OS... " +msg_info "Updating Container OS" apt update &>/dev/null apt-get -qqy upgrade &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Updated Container OS" -echo -en "${GN} Installing Dependencies... " +msg_info "Installing Dependencies" apt-get update &>/dev/null apt-get -qqy install \ sudo \ @@ -69,9 +60,9 @@ apt-get -qqy install \ python3-dev \ git \ lsb-release &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Installed Dependencies" - echo -en "${GN} Installing Python... " +msg_info "Installing Dependencies" 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 @@ -80,38 +71,38 @@ echo -e "${CM}${CL} \r" 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 "${CM}${CL} \r" +msg_ok "Installed Dependencies" -echo -en "${GN} Installing Openresty... " +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 -echo -e "${CM}${CL} \r" +msg_ok "Installed Openresty" -echo -en "${GN} Setting up Node.js Repository... " +msg_info "Setting up Node.js Repository" sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Set up Node.js Repository" -echo -en "${GN} Installing Node.js... " +msg_info "Installing Node.js" sudo apt-get install -y nodejs git make g++ gcc &>/dev/null - echo -e "${CM}${CL} \r" +msg_ok "Installed Node.js" -echo -en "${GN} Installing Yarn... " +msg_info "Installing Yarn" npm install --global yarn &>/dev/null -echo -e "${CM}${CL} \r" +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) }') \ -echo -en "${GN} Downloading NPM v${RELEASE}... " +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} -echo -e "${CM}${CL} \r" +msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" -echo -en "${GN} Setting up Enviroment... " +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 @@ -155,7 +146,7 @@ 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 -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 @@ -164,18 +155,18 @@ fi mkdir -p /app/global /app/frontend/images cp -r backend/* /app cp -r global/* /app/global -echo -e "${CM}${CL} \r" +msg_ok "Set up Enviroment" -echo -en "${GN} Building Frontend... " +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 -echo -e "${CM}${CL} \r" +msg_ok "Built Frontend" -echo -en "${GN} Initializing Backend... " +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 @@ -195,9 +186,9 @@ fi cd /app export NODE_ENV=development yarn install --network-timeout=30000 &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Initialized Backend" -echo -en "${GN} Creating NPM Service... " +msg_info "Creating Service" cat << 'EOF' > /lib/systemd/system/npm.service [Unit] Description=Nginx Proxy Manager @@ -215,11 +206,11 @@ Restart=on-failure [Install] WantedBy=multi-user.target EOF -echo -e "${CM}${CL} \r" +msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6); if [[ $PASS != $ ]]; then -echo -en "${GN} Customizing Container... " +msg_info "Customizing Container" rm /etc/motd rm /etc/update-motd.d/10-uname touch ~/.hushlogin @@ -232,17 +223,17 @@ ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,3840 EOF systemctl daemon-reload systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -echo -e "${CM}${CL} \r" +msg_ok "Customized Container" fi -echo -en "${GN} Starting Services... " +msg_info "Starting Services" systemctl enable npm &>/dev/null systemctl start openresty systemctl start npm -echo -e "${CM}${CL} \r" +msg_ok "Started Services" -echo -en "${GN} Cleanup... " +msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* /var/lib/apt/lists/* -echo -e "${CM}${CL} \n" +msg_ok "Cleaned" From 9d8f92a7b417cab662510ed0f1d2dd80cf10a96c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:01:46 -0400 Subject: [PATCH 35/46] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 444b0d78..442c9b0e 100644 --- a/README.md +++ b/README.md @@ -357,17 +357,17 @@ ________________________________________________________________________________
- Nginx Proxy Manager LXC + 🔸Nginx Proxy Manager LXC

hero

Nginx Proxy Manager LXC

-To create a new Proxmox Nginx Proxy Manager LXC Container, run the following in the Proxmox Shell (V2). +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.sh)" + bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nginx-proxy-manager-v3.sh)" ```

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

From 478df7e3912f9f9d4bf0e1527fbb75dd933ec674 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:02:41 -0400 Subject: [PATCH 36/46] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index b885e996..657858f2 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -19,6 +19,8 @@ All notable changes to this project will be documented in this file. - New V3 Install Script - **Motioneye LXC** - New V3 Install Script +- **Nginx Proxy Manager LXC** + - New V3 Install Script ## 2022-04-17 From 28abc55408aefed1da353cb072144c0d24d137c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:06:32 -0400 Subject: [PATCH 37/46] Rename adguard_container.sh to adguard-v1.sh --- ct/{adguard_container.sh => adguard-v1.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{adguard_container.sh => adguard-v1.sh} (100%) diff --git a/ct/adguard_container.sh b/ct/adguard-v1.sh similarity index 100% rename from ct/adguard_container.sh rename to ct/adguard-v1.sh From c565cbabbd914daee74d789844611786689db3a9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:07:13 -0400 Subject: [PATCH 38/46] Rename debian11_container.sh to debian-v1.sh --- ct/{debian11_container.sh => debian-v1.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{debian11_container.sh => debian-v1.sh} (100%) diff --git a/ct/debian11_container.sh b/ct/debian-v1.sh similarity index 100% rename from ct/debian11_container.sh rename to ct/debian-v1.sh From bc843af3a2e6d997bfef11fc699e7b18792e7280 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:07:50 -0400 Subject: [PATCH 39/46] Rename esphome_container.sh to esphome-v1.sh --- ct/{esphome_container.sh => esphome-v1.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{esphome_container.sh => esphome-v1.sh} (100%) diff --git a/ct/esphome_container.sh b/ct/esphome-v1.sh similarity index 100% rename from ct/esphome_container.sh rename to ct/esphome-v1.sh From 596bda08bb0748db01b95c13f0eb4579ed72ed52 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:09:01 -0400 Subject: [PATCH 40/46] Rename ha_container.sh to homeassistant-v1.sh --- ct/{ha_container.sh => homeassistant-v1.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{ha_container.sh => homeassistant-v1.sh} (100%) diff --git a/ct/ha_container.sh b/ct/homeassistant-v1.sh similarity index 100% rename from ct/ha_container.sh rename to ct/homeassistant-v1.sh From 7f35db22393a36047efe40812054f84142b2f0a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:09:41 -0400 Subject: [PATCH 41/46] Rename motioneye_container.sh to motioneye-v1.sh --- ct/{motioneye_container.sh => motioneye-v1.sh} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename ct/{motioneye_container.sh => motioneye-v1.sh} (99%) diff --git a/ct/motioneye_container.sh b/ct/motioneye-v1.sh similarity index 99% rename from ct/motioneye_container.sh rename to ct/motioneye-v1.sh index 28a88567..944ee9b6 100644 --- a/ct/motioneye_container.sh +++ b/ct/motioneye-v1.sh @@ -165,4 +165,4 @@ 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" \ No newline at end of file +\e[0m" From a6af2826a38594e6e0f3e2baf5c98493ca64a8d7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:10:49 -0400 Subject: [PATCH 42/46] Rename npm_container.sh to nginx-proxy-manager-v1.sh --- ct/{npm_container.sh => nginx-proxy-manager-v1.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{npm_container.sh => nginx-proxy-manager-v1.sh} (100%) diff --git a/ct/npm_container.sh b/ct/nginx-proxy-manager-v1.sh similarity index 100% rename from ct/npm_container.sh rename to ct/nginx-proxy-manager-v1.sh From 1fc7ec265087e8179f5edfa919eef51fc64ce8da Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:12:22 -0400 Subject: [PATCH 43/46] Rename podman_ha_container.sh to podman-homeassistant-v1.sh --- ct/{podman_ha_container.sh => podman-homeassistant-v1.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{podman_ha_container.sh => podman-homeassistant-v1.sh} (100%) diff --git a/ct/podman_ha_container.sh b/ct/podman-homeassistant-v1.sh similarity index 100% rename from ct/podman_ha_container.sh rename to ct/podman-homeassistant-v1.sh From b9df30c47f383ded3bbe1688cd2150a57dd0dd0b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:13:24 -0400 Subject: [PATCH 44/46] Rename vault_container.sh to vaultwarden-v1.sh --- ct/{vault_container.sh => vaultwarden-v1.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{vault_container.sh => vaultwarden-v1.sh} (100%) diff --git a/ct/vault_container.sh b/ct/vaultwarden-v1.sh similarity index 100% rename from ct/vault_container.sh rename to ct/vaultwarden-v1.sh From c0069a425ac856d27e299d76e75a4c8e5b1dd73f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:14:04 -0400 Subject: [PATCH 45/46] Rename zigbee2mqtt_container.sh to zigbee2mqtt-v1.sh --- ct/{zigbee2mqtt_container.sh => zigbee2mqtt-v1.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{zigbee2mqtt_container.sh => zigbee2mqtt-v1.sh} (100%) diff --git a/ct/zigbee2mqtt_container.sh b/ct/zigbee2mqtt-v1.sh similarity index 100% rename from ct/zigbee2mqtt_container.sh rename to ct/zigbee2mqtt-v1.sh From 17688b6784c121276ef909121f1e71f46d571994 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Apr 2022 08:15:00 -0400 Subject: [PATCH 46/46] Rename zwavejs2mqtt_container.sh to zwavejs2mqtt-v1.sh --- ct/{zwavejs2mqtt_container.sh => zwavejs2mqtt-v1.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{zwavejs2mqtt_container.sh => zwavejs2mqtt-v1.sh} (100%) diff --git a/ct/zwavejs2mqtt_container.sh b/ct/zwavejs2mqtt-v1.sh similarity index 100% rename from ct/zwavejs2mqtt_container.sh rename to ct/zwavejs2mqtt-v1.sh