From 3280f46dae1bbc43f9060c165f7d28763fcf9298 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:26:05 -0400 Subject: [PATCH 01/22] Update adguard.sh --- ct/adguard.sh | 63 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index 69e27ea8..ac8278f8 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -82,9 +82,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -117,6 +117,52 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done + set -o errexit set -o errtrace set -o nounset @@ -192,6 +238,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F " if [ "$STORAGE_TYPE" == "zfspool" ]; then warn "Some addons may not work due to ZFS not supporting 'fallocate'." fi +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 7936bda04baf9e0c16050f95f8db0d854592984f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:27:31 -0400 Subject: [PATCH 02/22] Update daemonsync.sh --- ct/daemonsync.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index 0a12272b..c6403ba5 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -80,9 +80,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -115,6 +115,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -191,6 +236,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F " if [ "$STORAGE_TYPE" == "zfspool" ]; then warn "Some addons may not work due to ZFS not supporting 'fallocate'." fi +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 305d8b1dc248041903ab2d48fd631981aa05a798 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:31:54 -0400 Subject: [PATCH 03/22] Update dashy.sh --- ct/dashy.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/dashy.sh b/ct/dashy.sh index 67d42563..fc62084b 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -81,9 +81,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -116,6 +116,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -192,6 +237,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F " if [ "$STORAGE_TYPE" == "zfspool" ]; then warn "Some addons may not work due to ZFS not supporting 'fallocate'." fi +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 556773c7b24579bbe10c3a593bab45ef22d0eb37 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:33:58 -0400 Subject: [PATCH 04/22] Update debian.sh --- ct/debian.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/debian.sh b/ct/debian.sh index b5898aaa..d36b6e82 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -81,9 +81,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -116,6 +116,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -197,6 +242,19 @@ cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From c43fc18705c75bea54d994b38511501a237f4000 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:37:11 -0400 Subject: [PATCH 05/22] Update docker.sh --- ct/docker.sh | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/ct/docker.sh b/ct/docker.sh index 110a0b7c..a5e5096e 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -160,6 +160,52 @@ while [ $opt != '' ] esac fi done +show_menu4(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message4=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" + printf " ${YW}${message4}${CL}\n" +} +show_menu4 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu4; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -248,6 +294,19 @@ cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 9b42d48f5ebc21650f96720faafc36956a5edfd1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:41:00 -0400 Subject: [PATCH 06/22] Update esphome.sh --- ct/esphome.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/esphome.sh b/ct/esphome.sh index 52eacea5..06f9d513 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -81,9 +81,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -116,6 +116,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -197,6 +242,19 @@ cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From ec5d19e41031a5a0db21641d86f1d5c4364a0458 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:42:15 -0400 Subject: [PATCH 07/22] Update grafana.sh --- ct/grafana.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/grafana.sh b/ct/grafana.sh index de689df1..0e7244df 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -79,9 +79,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -114,6 +114,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -190,6 +235,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F " if [ "$STORAGE_TYPE" == "zfspool" ]; then warn "Some addons may not work due to ZFS not supporting 'fallocate'." fi +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 1ea03657315231579e880832ad47f4bad80b385f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:49:13 -0400 Subject: [PATCH 08/22] Update homeassistant.sh --- ct/homeassistant.sh | 127 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 123 insertions(+), 4 deletions(-) diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 54afbe11..61e0eaf9 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -79,9 +79,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -114,7 +114,100 @@ while [ $opt != '' ] esac fi done - +show_menu3(){ + printf " ${RD} If Using ZFS, You Have Storage Driver Options${CL}\n" + printf " ${RD} Non ZFS, Select Standard overlay2 Storage Driver${CL}\n" + printf " ${YW} 1)${GN} Use fuse-overlayfs Storage Driver${CL}\n" + printf " ${YW} 2)${GN} Use Standard overlay2 Storage Driver${CL}\n" + + printf "Please choose a Storage Driver and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using fuse-overlayfs Storage Driver"; + STORAGE_DRIVER="fuse" + break; + ;; + 2) clear; + header_info; + option_picked "Using overlay2 Storage Driver"; + STORAGE_DRIVER=" " + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a Storage Driver from the menu"; + show_menu3; + ;; + esac + fi + done +show_menu4(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message4=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" + printf " ${YW}${message4}${CL}\n" +} +show_menu4 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu4; + ;; + esac + fi + done + set -o errexit set -o errtrace set -o nounset @@ -161,8 +254,14 @@ function cleanup() { popd >/dev/null rm -rf $TEMP_DIR } - if [ "$IM" == "1" ]; then + if [ "$IM" == "1" ] && [ "$STORAGE_DRIVER" == " " ]; then FEATURES="nesting=1,keyctl=1" + elif + [ "$IM" == "1" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then + FEATURES="nesting=1,keyctl=1,fuse=1" + elif + [ "$IM" == "0" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then + FEATURES="nesting=1,fuse=1" else FEATURES="nesting=1" fi @@ -195,11 +294,31 @@ cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID echo -e "${CM}${CL} \r" + if [ "$STORAGE_TYPE" == "zfspool" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then + pct push $CTID fuse-overlayfs /usr/local/bin/fuse-overlayfs -perms 755 + info "Using ${BL}fuse-overlayfs${CL} Storage Driver." + else + info "Using ${BL}overlay2${CL} Storage Driver." + fi + alias lxc-cmd="lxc-attach -n $CTID --" lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/homeassistant-install.sh)" || exit From e13011ca6a4f9e97d5cd978ae6eba77b14ce092f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:52:55 -0400 Subject: [PATCH 09/22] Update homebridge.sh --- ct/homebridge.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/homebridge.sh b/ct/homebridge.sh index e4bd0871..8f6eb118 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -78,9 +78,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -113,6 +113,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -189,6 +234,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F " if [ "$STORAGE_TYPE" == "zfspool" ]; then warn "Some addons may not work due to ZFS not supporting 'fallocate'." fi +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 0aa58706531fd852b0ed46b37db8ce8d837ade2d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:53:51 -0400 Subject: [PATCH 10/22] Update influxdb.sh --- ct/influxdb.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 4bf9b405..119d2a4e 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -79,9 +79,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -114,6 +114,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -190,6 +235,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F " if [ "$STORAGE_TYPE" == "zfspool" ]; then warn "Some addons may not work due to ZFS not supporting 'fallocate'." fi +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 0e0c6272b75244d55b18dd435bdc08610dd06d7a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:55:58 -0400 Subject: [PATCH 11/22] Update mariadb.sh --- ct/mariadb.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/mariadb.sh b/ct/mariadb.sh index 7776ba36..73e2134a 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -79,9 +79,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -114,6 +114,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -190,6 +235,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F " if [ "$STORAGE_TYPE" == "zfspool" ]; then warn "Some addons may not work due to ZFS not supporting 'fallocate'." fi +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From ec93d0968b0d9dbefaec77c8f46c0d5187f1b99a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:57:16 -0400 Subject: [PATCH 12/22] Update motioneye.sh --- ct/motioneye.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 23332a38..92894a21 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -80,9 +80,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -115,6 +115,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -196,6 +241,19 @@ cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 7ffc9508d5083489a66b9b5bc2270f3625ca9275 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:58:27 -0400 Subject: [PATCH 13/22] Update mqtt.sh --- ct/mqtt.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 315a9e9e..254f4619 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -79,9 +79,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -114,6 +114,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -190,6 +235,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F " if [ "$STORAGE_TYPE" == "zfspool" ]; then warn "Some addons may not work due to ZFS not supporting 'fallocate'." fi +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From b35ede13b91a99ec164ef9b4b93a1b1dbac47b7f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 12:59:51 -0400 Subject: [PATCH 14/22] Update nginx-proxy-manager.sh --- ct/nginx-proxy-manager.sh | 62 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/nginx-proxy-manager.sh b/ct/nginx-proxy-manager.sh index 3f51512d..670cbdcd 100644 --- a/ct/nginx-proxy-manager.sh +++ b/ct/nginx-proxy-manager.sh @@ -78,9 +78,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -113,6 +113,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -189,6 +234,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F " if [ "$STORAGE_TYPE" == "zfspool" ]; then warn "Some addons may not work due to ZFS not supporting 'fallocate'." fi +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From fbcb26cfaef021e848809236082464ee3f892233 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 13:00:53 -0400 Subject: [PATCH 15/22] Update node-red.sh --- ct/node-red.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/node-red.sh b/ct/node-red.sh index b75eb47d..504ddc71 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -79,9 +79,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -114,6 +114,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -190,6 +235,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F " if [ "$STORAGE_TYPE" == "zfspool" ]; then warn "Some addons may not work due to ZFS not supporting 'fallocate'." fi +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From ccaf83a02a2390e84d91aa23b3f4c7525ccc9c5f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 13:02:06 -0400 Subject: [PATCH 16/22] Update photoprism.sh --- ct/photoprism.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/photoprism.sh b/ct/photoprism.sh index ec2325ad..076aefef 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -81,9 +81,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -116,6 +116,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -197,6 +242,19 @@ cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 12bedcae6ad5fbef5087bbe0e5935f92fc2d8cfb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 13:03:29 -0400 Subject: [PATCH 17/22] Update pihole.sh --- ct/pihole.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/pihole.sh b/ct/pihole.sh index 870c883c..2667f184 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -80,9 +80,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -115,6 +115,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -196,6 +241,19 @@ cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From fb435da0e41df2c15c8659cb1cf154272b0d848f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 13:04:49 -0400 Subject: [PATCH 18/22] Update technitiumdns.sh --- ct/technitiumdns.sh | 62 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index 7a66d1b8..15ffdf42 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -81,9 +81,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -116,6 +116,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -197,6 +242,19 @@ cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 0908630416698b3afba37eb088cf8b6efcff9f4d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 13:05:53 -0400 Subject: [PATCH 19/22] Update ubuntu.sh --- ct/ubuntu.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index d187fb95..d24150a7 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -79,9 +79,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -114,6 +114,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -195,6 +240,19 @@ cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 3bac36c4b4a6ccd6bc48915cb07d215b282efee0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 13:07:10 -0400 Subject: [PATCH 20/22] Update vaultwarden.sh --- ct/vaultwarden.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index c81d099c..6e8c43b7 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -81,9 +81,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -116,6 +116,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -197,6 +242,19 @@ cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 34d0cd7121146badde2998c6149b7029e358bd9f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 13:08:21 -0400 Subject: [PATCH 21/22] Update zigbee2mqtt.sh --- ct/zigbee2mqtt.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index 0b0e222b..9d0edba5 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -81,9 +81,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -116,6 +116,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -203,6 +248,19 @@ lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create= lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID From 64acabc3f8610708451b235ba08dee632e3eb588 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 13:09:18 -0400 Subject: [PATCH 22/22] Update zwavejs2mqtt.sh --- ct/zwavejs2mqtt.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ct/zwavejs2mqtt.sh b/ct/zwavejs2mqtt.sh index 9e66ab47..65034e6c 100644 --- a/ct/zwavejs2mqtt.sh +++ b/ct/zwavejs2mqtt.sh @@ -82,9 +82,9 @@ show_menu2(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} + message2=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message}${CL}\n" + printf " ${YW}${message2}${CL}\n" } show_menu2 while [ $opt != '' ] @@ -117,6 +117,51 @@ while [ $opt != '' ] esac fi done +show_menu3(){ + printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" + printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" + + printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message3=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message2}${CL}\n" + printf " ${YW}${message3}${CL}\n" +} +show_menu3 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic DHCP"; + DHCP=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Manual DHCP"; + DHCP="1" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a DHCP Type from the menu"; + show_menu3; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -204,6 +249,19 @@ lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create= lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file EOF +if [ "$DHCP" == "1" ]; then +MAC=$(pct config $CTID \ +| grep -i hwaddr \ +| awk '{print substr($2, 31, length($3) 17 ) }') \ + +echo -e "MAC Address ${BL}$MAC${CL}" + +dhcp_reservation(){ + printf "Please set DHCP reservation and press Enter." + read +} +dhcp_reservation +fi echo -en "${GN} Starting LXC Container... " pct start $CTID