From 44adade7c822f213300b8883ad33385a349501a9 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 18 Jun 2023 19:59:28 +0200 Subject: [PATCH 01/74] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index fb51f77..b368e41 100644 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ VERSION="1.6.6" # Branch -BRANCH="master" +BRANCH="development" # Variable / Function LOCAL_FILES="/root/Proxmox-Updater" From fa06bc574df99aae732ad4266f765f017ad1c79e Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 18 Jun 2023 20:00:23 +0200 Subject: [PATCH 02/74] Update update.sh --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 28e5c31..74861ae 100644 --- a/update.sh +++ b/update.sh @@ -7,7 +7,7 @@ VERSION="3.8.5" # Branch -BRANCH="master" +BRANCH="development" # Variable / Function LOG_FILE=/var/log/update-"$HOSTNAME".log # <- change location for logfile if you want From c090c3a31ebc216b3952b68606d8dcc482cd09e0 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 18 Jun 2023 20:00:38 +0200 Subject: [PATCH 03/74] Update welcome-screen.sh --- welcome-screen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/welcome-screen.sh b/welcome-screen.sh index 103aaa9..aac76ae 100644 --- a/welcome-screen.sh +++ b/welcome-screen.sh @@ -7,7 +7,7 @@ VERSION="1.3.1" # Branch -BRANCH="master" +BRANCH="development" # Variable / Function CONFIG_FILE="/root/Proxmox-Updater/update.conf" From 07d00a20d6486b472ebfbe25d303808a932b6e13 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Wed, 21 Jun 2023 07:25:51 +0200 Subject: [PATCH 04/74] text cleaning --- install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index b368e41..ebbd3e2 100644 --- a/install.sh +++ b/install.sh @@ -132,7 +132,7 @@ INSTALL () { echo -e "\n${BL}[Info]${GN} Installing Proxmox-Updater${CL}\n" if [ -f "/usr/local/bin/update" ]; then echo -e "${OR}Proxmox-Updater is already installed.${CL}" - read -p "Should I update for you? Type [Y/y] or Enter for yes - enything else will exit" -n 1 -r -s + read -p "Should I update for you? Type [Y/y] or Enter for yes - anything else will exit" -n 1 -r -s if [[ $REPLY =~ ^[Yy]$ || $REPLY = "" ]]; then bash <(curl -s $SERVER_URL/install.sh) update else @@ -159,7 +159,7 @@ INSTALL () { echo -e "${OR}Finished. Run Proxmox-Updater with 'update'.${CL}" echo -e "For infos and warnings please check the readme under \n" echo -e "${OR}Also want to install the Welcome-Screen?${CL}\n\ -Type [Y/y] or Enter for yes - enything else will exit" +Type [Y/y] or Enter for yes - anything else will exit" read -p "" -n 1 -r -s if [[ $REPLY =~ ^[Yy]$ || $REPLY = "" ]]; then WELCOME_SCREEN_INSTALL @@ -175,7 +175,7 @@ UPDATE () { echo -e "${RD}Proxmox-Updater has changed directorys, so the old directory\n\ /root/Update-Scripts will be delete.${CL}\n\ ${OR}Is it OK for you, or want to backup your files first?${CL}\n" - read -p "Type [Y/y] for DELETE - enything else will exit " -n 1 -r -s + read -p "Type [Y/y] for DELETE - anything else will exit " -n 1 -r -s if [[ $REPLY =~ ^[Yy]$ ]]; then rm -rf /root/Update-Proxmox-Scripts || true bash <(curl -s $SERVER_URL/install.sh) update @@ -239,7 +239,7 @@ ${OR}Is it OK for you, or want to backup your files first?${CL}\n" else # Install, because no installation found echo -e "${RD}Proxmox-Updater is not installed.\n\n${OR}Would you like to install it?${CL}" - read -p "Type [Y/y] or Enter for yes - enything else will exit" -n 1 -r -s + read -p "Type [Y/y] or Enter for yes - anything else will exit" -n 1 -r -s if [[ $REPLY =~ ^[Yy]$ || $REPLY = "" ]]; then bash <(curl -s $SERVER_URL/install.sh) else @@ -257,7 +257,7 @@ CHECK_DIFF () { Y or y : install the package maintainer's version (old file will be save as '$f.bak')\n \ N or n : keep your currently-installed version\n \ S or s : show the differences between the versions\n \ - The default action is to keep your current version.\n \ + The default action is to install new version and backup current file.\n \ *** $f (Y/y/N/n/S/s) [default=Y] ? " read -p "" -n 1 -r -s if [[ $REPLY =~ ^[Yy]$ || $REPLY = "" ]]; then @@ -283,13 +283,13 @@ WELCOME_SCREEN () { curl -s $SERVER_URL/check-updates.sh > /root/Proxmox-Updater-Temp/check-updates.sh if ! [[ -f "/etc/update-motd.d/01-welcome-screen" && -x "/etc/update-motd.d/01-welcome-screen" ]]; then echo -e "${OR} Welcome-Screen is not installed${CL}\n" - read -p "Would you like to install it also? Type [Y/y] or Enter for yes - enything else will skip" -n 1 -r -s && echo + read -p "Would you like to install it also? Type [Y/y] or Enter for yes - anything else will skip" -n 1 -r -s && echo if [[ $REPLY =~ ^[Yy]$ || $REPLY = "" ]]; then WELCOME_SCREEN_INSTALL fi else echo -e "${OR} Welcome-Screen is already installed${CL}\n" - read -p "Would you like to uninstall it? Type [Y/y] for yes - enything else will skip" -n 1 -r -s && echo + read -p "Would you like to uninstall it? Type [Y/y] for yes - anything else will skip" -n 1 -r -s && echo if [[ $REPLY =~ ^[Yy]$ ]]; then rm -rf /etc/update-motd.d/01-welcome-screen || true rm -rf /etc/motd || true @@ -326,7 +326,7 @@ UNINSTALL () { if [ -f /usr/local/bin/update ]; then echo -e "\n${BL}[Info]${GN} Uninstall Proxmox-Updater${CL}\n" echo -e "${RD}Really want to remove Proxmox-Updater?${CL}\n\ -Type [Y/y] for yes - enything else will exit" +Type [Y/y] for yes - anything else will exit" read -p "" -n 1 -r -s if [[ $REPLY =~ ^[Yy]$ ]]; then rm /usr/local/bin/update From 21b3ab695c7bed765f19a771b7401df29f68bfeb Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Wed, 21 Jun 2023 07:26:34 +0200 Subject: [PATCH 05/74] text cleaning --- update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index 74861ae..2c6ff36 100644 --- a/update.sh +++ b/update.sh @@ -217,7 +217,7 @@ VERSION_CHECK () { Installed: $VERSION / Server: $SERVER_VERSION\n" if [[ "$HEADLESS" != true ]]; then echo -e "${OR}Want to update Proxmox-Updater first?${CL}" - read -p "Type [Y/y] or Enter for yes - enything else will skip " -n 1 -r -s + read -p "Type [Y/y] or Enter for yes - anything else will skip " -n 1 -r -s if [[ "$REPLY" =~ ^[Yy]$ || "$REPLY" = "" ]]; then bash <(curl -s "$SERVER_URL"/install.sh) update fi @@ -235,7 +235,7 @@ VERSION_CHECK () { # Update Proxmox-Updater UPDATE () { echo -e "Update to $BRANCH branch?" - read -p "Type [Y/y] or [Enter] for yes - enything else will exit" -n 1 -r -s + read -p "Type [Y/y] or [Enter] for yes - anything else will exit" -n 1 -r -s if [[ $REPLY =~ ^[Yy]$ || $REPLY = "" ]]; then bash <(curl -s "https://raw.githubusercontent.com/BassT23/Proxmox/$BRANCH"/install.sh) update else @@ -247,7 +247,7 @@ UPDATE () { UNINSTALL () { echo -e "\n${BL}[Info]${OR} Uninstall Proxmox-Updater${CL}\n" echo -e "${RD}Really want to remove Proxmox-Updater?${CL}" - read -p "Type [Y/y] for yes - enything else will exit " -n 1 -r -s + read -p "Type [Y/y] for yes - anything else will exit " -n 1 -r -s if [[ "$REPLY" =~ ^[Yy]$ ]]; then bash <(curl -s "$SERVER_URL"/install.sh) uninstall else From e54722e42f476ca27d1e5e420c7eddd6439bcca3 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Wed, 21 Jun 2023 08:02:27 +0200 Subject: [PATCH 06/74] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b7d6066..91da5a8 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ and install new # Extra Updates: -If updater detects installation: (disable, if you wand in `/root/Proxmox-Updater/update.conf`) +If updater detects installation: (disable, if you want in `/root/Proxmox-Updater/update.conf`) - PiHole - ioBroker - Pterodactyl From 68aeffdc2a75e84f6e9819b70cfc4508f4de9cb8 Mon Sep 17 00:00:00 2001 From: Uruk <68083474+Uruknara@users.noreply.github.com> Date: Sat, 8 Jul 2023 12:56:27 +0200 Subject: [PATCH 07/74] Update install.sh --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index ebbd3e2..0721c80 100644 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ VERSION="1.6.6" # Branch -BRANCH="development" +BRANCH="develop" # Variable / Function LOCAL_FILES="/root/Proxmox-Updater" @@ -191,8 +191,8 @@ ${OR}Is it OK for you, or want to backup your files first?${CL}\n" curl -s https://api.github.com/repos/BassT23/Proxmox/releases/latest | grep "browser_download_url" | cut -d : -f 2,3 | tr -d \" | wget -i - -q -O /root/Proxmox-Updater-Temp/Proxmox-Updater.tar.gz elif [[ "$BRANCH" == beta ]]; then curl -s -L https://github.com/BassT23/Proxmox/tarball/beta > /root/Proxmox-Updater-Temp/Proxmox-Updater.tar.gz - elif [[ "$BRANCH" == development ]]; then - curl -s -L https://github.com/BassT23/Proxmox/tarball/development > /root/Proxmox-Updater-Temp/Proxmox-Updater.tar.gz + elif [[ "$BRANCH" == develop ]]; then + curl -s -L https://github.com/BassT23/Proxmox/tarball/develop > /root/Proxmox-Updater-Temp/Proxmox-Updater.tar.gz fi tar -zxf /root/Proxmox-Updater-Temp/Proxmox-Updater.tar.gz -C /root/Proxmox-Updater-Temp rm -rf /root/Proxmox-Updater-Temp/Proxmox-Updater.tar.gz || true From e6f6db97063b3e92853fd9e7ae4b43699090ea82 Mon Sep 17 00:00:00 2001 From: Uruk <68083474+Uruknara@users.noreply.github.com> Date: Sat, 8 Jul 2023 12:57:52 +0200 Subject: [PATCH 08/74] Update update.sh --- update.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/update.sh b/update.sh index 2c6ff36..16fbe52 100644 --- a/update.sh +++ b/update.sh @@ -7,7 +7,7 @@ VERSION="3.8.5" # Branch -BRANCH="development" +BRANCH="develop" # Variable / Function LOG_FILE=/var/log/update-"$HOSTNAME".log # <- change location for logfile if you want @@ -146,13 +146,13 @@ ARGUMENTS () { BRANCH=beta BRANCH_SET=true ;; - development) + develop) if [[ "$2" != -up ]]; then echo -e "\n${OR} Wrong usage! Use branch update like this:${CL}" echo -e " update beta -up\n" exit 2 fi - BRANCH=development + BRANCH=develop BRANCH_SET=true ;; -up) @@ -189,7 +189,7 @@ USAGE () { echo -e " -s --silent Silent / Headless Mode" echo -e " master Use master branch" echo -e " beta Use beta branch" - echo -e " development Use development branch\n" + echo -e " develop Use develop branch\n" echo -e "{COMMAND}:" echo -e "=========" echo -e " -h --help Show this help" @@ -209,8 +209,8 @@ VERSION_CHECK () { SERVER_VERSION=$(awk -F'"' '/^VERSION=/ {print $2}' /root/Proxmox-Updater/temp/update.sh) if [[ "$BRANCH" == beta ]]; then echo -e "\n${OR} *** You are on beta branch ***${CL}" - elif [[ "$BRANCH" == development ]]; then - echo -e "\n${OR} *** You are on development branch ***${CL}" + elif [[ "$BRANCH" == develop ]]; then + echo -e "\n${OR} *** You are on develop branch ***${CL}" fi if [[ "$SERVER_VERSION" > "$VERSION" ]]; then echo -e "\n${OR} *** A newer version is available ***${CL}\n\ From 882c642474848d56762b9848cb196ba0dde5c96d Mon Sep 17 00:00:00 2001 From: Uruk <68083474+Uruknara@users.noreply.github.com> Date: Sat, 8 Jul 2023 12:58:18 +0200 Subject: [PATCH 09/74] Update welcome-screen.sh --- welcome-screen.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/welcome-screen.sh b/welcome-screen.sh index aac76ae..c5f442f 100644 --- a/welcome-screen.sh +++ b/welcome-screen.sh @@ -7,7 +7,7 @@ VERSION="1.3.1" # Branch -BRANCH="development" +BRANCH="develop" # Variable / Function CONFIG_FILE="/root/Proxmox-Updater/update.conf" @@ -28,8 +28,8 @@ VERSION_CHECK () { LOCAL_VERSION=$(awk -F'"' '/^VERSION=/ {print $2}' /usr/local/bin/update) if [[ "$BRANCH" == beta ]]; then echo -e "\n${OR} *** You are on beta branch ***${CL}" - elif [[ "$BRANCH" == development ]]; then - echo -e "\n${OR} *** You are on development branch ***${CL}" + elif [[ "$BRANCH" == develop ]]; then + echo -e "\n${OR} *** You are on develop branch ***${CL}" fi if [[ "$SERVER_VERSION" > "$LOCAL_VERSION" ]]; then echo -e "\n${OR} *** A newer version is available ***${CL}\n\ From 5249e06261bcf5c9b80d380aa6b169a2f3531fc4 Mon Sep 17 00:00:00 2001 From: Uruk Date: Sat, 8 Jul 2023 13:01:11 +0200 Subject: [PATCH 10/74] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 91da5a8..2619b8c 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ So connect from first node (on which you install the Proxmox-Updater) to node2 w 2. Use ssh connection with Key-Based Authentication (a little more work, but nicer output and "extra" support) - more infos here: [SSH Connection](https://github.com/BassT23/Proxmox/blob/development/ssh.md) + more infos here: [SSH Connection](https://github.com/BassT23/Proxmox/blob/develop/ssh.md) # Update the script: From bc32bc56d070a76bb962d07f8cf758a6f27e2f3e Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Thu, 13 Jul 2023 14:58:34 +0200 Subject: [PATCH 11/74] add option to exclude/only for update-checker --- update.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/update.conf b/update.conf index 5acd31b..21a1737 100644 --- a/update.conf +++ b/update.conf @@ -45,3 +45,13 @@ DOCKER_COMPOSE="true" ONLY="" EXCLUDE="" + +################################################ +# Update-Checker # +# Example: ONLY/EXCLUDE="100 110 120" # +################################################ +# ! If 'ONLY' is set, 'EXCLUDE' don't work ! # +################################################ + +ONLY_UPDATE_CHECK="" +EXCLUDE_UPDATE_CHECK="" From 3187ae134f3d4640cdfe278bff7481f31150f706 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Thu, 13 Jul 2023 15:00:07 +0200 Subject: [PATCH 12/74] add option for exclude/only during update-check --- check-updates.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/check-updates.sh b/check-updates.sh index 0fe0cab..2a2db66 100644 --- a/check-updates.sh +++ b/check-updates.sh @@ -80,8 +80,10 @@ READ_WRITE_CONFIG () { WITH_VM=$(awk -F'"' '/^WITH_VM=/ {print $2}' $CONFIG_FILE) RUNNING=$(awk -F'"' '/^RUNNING_CONTAINER=/ {print $2}' $CONFIG_FILE) STOPPED=$(awk -F'"' '/^STOPPED_CONTAINER=/ {print $2}' $CONFIG_FILE) - EXCLUDED=$(awk -F'"' '/^EXCLUDE=/ {print $2}' $CONFIG_FILE) - ONLY=$(awk -F'"' '/^ONLY=/ {print $2}' $CONFIG_FILE) +# EXCLUDED=$(awk -F'"' '/^EXCLUDE=/ {print $2}' $CONFIG_FILE) +# ONLY=$(awk -F'"' '/^ONLY=/ {print $2}' $CONFIG_FILE) + EXCLUDED=$(awk -F'"' '/^EXCLUDE_UPDATE_CHECK=/ {print $2}' $CONFIG_FILE) + ONLY=$(awk -F'"' '/^ONLY_UPDATE_CHECK=/ {print $2}' $CONFIG_FILE) } ## HOST ## From 22063c90c5d87b09465a33858ce78f91ce10b954 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 14 Jul 2023 06:16:56 +0200 Subject: [PATCH 13/74] add option to exclude/only for update-checker --- welcome-screen.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/welcome-screen.sh b/welcome-screen.sh index c5f442f..576fe15 100644 --- a/welcome-screen.sh +++ b/welcome-screen.sh @@ -51,8 +51,10 @@ READ_WRITE_CONFIG () { WITH_VM=$(awk -F'"' '/^WITH_VM=/ {print $2}' $CONFIG_FILE) RUNNING=$(awk -F'"' '/^RUNNING_CONTAINER=/ {print $2}' $CONFIG_FILE) STOPPED=$(awk -F'"' '/^STOPPED_CONTAINER=/ {print $2}' $CONFIG_FILE) - EXCLUDED=$(awk -F'"' '/^EXCLUDE=/ {print $2}' $CONFIG_FILE) - ONLY=$(awk -F'"' '/^ONLY=/ {print $2}' $CONFIG_FILE) +# EXCLUDED=$(awk -F'"' '/^EXCLUDE=/ {print $2}' $CONFIG_FILE) +# ONLY=$(awk -F'"' '/^ONLY=/ {print $2}' $CONFIG_FILE) + EXCLUDED=$(awk -F'"' '/^EXCLUDE_UPDATE_CHECK=/ {print $2}' $CONFIG_FILE) + ONLY=$(awk -F'"' '/^ONLY_UPDATE_CHECK=/ {print $2}' $CONFIG_FILE) if [[ $ONLY != "" ]]; then echo -e "${OR}Only is set. Not all machines are checked.${CL}\n" elif [[ $ONLY == "" && $EXCLUDED != "" ]]; then From ef9bc3a5afa853bc7fe38916a60ecf50130a53c1 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 14 Jul 2023 06:17:24 +0200 Subject: [PATCH 14/74] Update welcome-screen.sh --- welcome-screen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/welcome-screen.sh b/welcome-screen.sh index 576fe15..ee08a90 100644 --- a/welcome-screen.sh +++ b/welcome-screen.sh @@ -4,7 +4,7 @@ # Welcome-Screen # ################## -VERSION="1.3.1" +VERSION="1.3.2" # Branch BRANCH="develop" From 66d2acc4f414b2b275f73c260d0f31b8731c19ad Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 14 Jul 2023 06:17:47 +0200 Subject: [PATCH 15/74] Update check-updates.sh --- check-updates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-updates.sh b/check-updates.sh index 2a2db66..1661864 100644 --- a/check-updates.sh +++ b/check-updates.sh @@ -4,7 +4,7 @@ # Check Updates # ################# -VERSION="1.4.4" +VERSION="1.4.5" #Variable / Function CONFIG_FILE="/root/Proxmox-Updater/update.conf" From d085e1d48142c1e9cf68e9a9b76407d1e16f5d0e Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Tue, 18 Jul 2023 12:12:49 +0200 Subject: [PATCH 16/74] Update update.conf --- update.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/update.conf b/update.conf index 21a1737..37e7cab 100644 --- a/update.conf +++ b/update.conf @@ -20,6 +20,9 @@ WITH_VM="true" STOPPED_CONTAINER="true" RUNNING_CONTAINER="true" +INCLUDE_KERNEL="true" +INCLUDE_PHASE_UPDATE="false" + ################################################ # Extra Updates # ################################################ From abcbad8f904e3a860d80d3c45b2dc4a2e238cee8 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Tue, 18 Jul 2023 12:13:41 +0200 Subject: [PATCH 17/74] Update update.conf --- update.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.conf b/update.conf index 37e7cab..2862e82 100644 --- a/update.conf +++ b/update.conf @@ -21,7 +21,7 @@ STOPPED_CONTAINER="true" RUNNING_CONTAINER="true" INCLUDE_KERNEL="true" -INCLUDE_PHASE_UPDATE="false" +INCLUDE_PHASED_UPDATES="false" ################################################ # Extra Updates # From c153fd04fda5aed26c808473320ecfec3716b52c Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Tue, 18 Jul 2023 12:18:01 +0200 Subject: [PATCH 18/74] Update update.sh --- update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/update.sh b/update.sh index 16fbe52..67b2a4d 100644 --- a/update.sh +++ b/update.sh @@ -320,6 +320,8 @@ READ_CONFIG () { WITH_VM=$(awk -F'"' '/^WITH_VM=/ {print $2}' "$CONFIG_FILE") RUNNING=$(awk -F'"' '/^RUNNING_CONTAINER=/ {print $2}' "$CONFIG_FILE") STOPPED=$(awk -F'"' '/^STOPPED_CONTAINER=/ {print $2}' "$CONFIG_FILE") + INCLUDE_KERNEL=$(awk -F'"' '/^INCLUDE_KERNEL=/ {print $2}' "$CONFIG_FILE") + INCLUDE_PHASED_UPDATES=$(awk -F'"' '/^INCLUDE_PHASED_UPDATES=/ {print $2}' "$CONFIG_FILE") EXTRA_GLOBAL=$(awk -F'"' '/^EXTRA_GLOBAL=/ {print $2}' "$CONFIG_FILE") EXTRA_IN_HEADLESS=$(awk -F'"' '/^IN_HEADLESS_MODE=/ {print $2}' "$CONFIG_FILE") EXCLUDED=$(awk -F'"' '/^EXCLUDE=/ {print $2}' "$CONFIG_FILE") From 49a560219fb81870135032ac04c7d60bc8da9200 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Tue, 18 Jul 2023 12:48:21 +0200 Subject: [PATCH 19/74] include phased update, if set in config file --- update.sh | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/update.sh b/update.sh index 67b2a4d..f606054 100644 --- a/update.sh +++ b/update.sh @@ -4,7 +4,7 @@ # Update # ########## -VERSION="3.8.5" +VERSION="3.8.6" # Branch BRANCH="develop" @@ -424,13 +424,18 @@ UPDATE_HOST_ITSELF () { echo -e "${OR}--- APT UPDATE ---${CL}" && apt-get update if [[ "$HEADLESS" == true ]]; then echo -e "\n${OR}--- APT UPGRADE HEADLESS ---${CL}" && \ - DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y + DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y else - echo -e "\n${OR}--- APT UPGRADE ---${CL}" && \ - apt-get dist-upgrade -y + if [[ "$INCLUDE_PHASED_UPDATES" != "true" ]]; then + echo -e "\n${OR}--- APT UPGRADE ---${CL}" && \ + apt-get dist-upgrade -y + else + echo -e "\n${OR}--- APT UPGRADE ---${CL}" && \ + apt-get -o APT::Get::Always-Include-Phased-Updates=true dist-upgrade -y + fi fi echo -e "\n${OR}--- APT CLEANING ---${CL}" && \ - apt-get --purge autoremove -y && echo + apt-get --purge autoremove -y && echo CHOST="true" UPDATE_CHECK CHOST="" @@ -494,7 +499,11 @@ UPDATE_CONTAINER () { pct exec "$CONTAINER" -- bash -c "DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y" else echo -e "\n${OR}--- APT UPGRADE ---${CL}" - pct exec "$CONTAINER" -- bash -c "apt-get dist-upgrade -y" + if [[ "$INCLUDE_PHASED_UPDATES" != "true" ]]; then + pct exec "$CONTAINER" -- bash -c "apt-get dist-upgrade -y" + else + pct exec "$CONTAINER" -- bash -c "apt-get -o APT::Get::Always-Include-Phased-Updates=true dist-upgrade -y" + fi fi echo -e "\n${OR}--- APT CLEANING ---${CL}" pct exec "$CONTAINER" -- bash -c "apt-get --purge autoremove -y" @@ -598,7 +607,11 @@ UPDATE_VM () { echo -e "${OR}--- APT UPDATE ---${CL}" ssh "$IP" apt-get update echo -e "\n${OR}--- APT UPGRADE ---${CL}" - ssh "$IP" apt-get upgrade -y + if [[ "$INCLUDE_PHASED_UPDATES" != "true" ]]; then + ssh "$IP" apt-get upgrade -y + else + ssh "$IP" apt-get -o APT::Get::Always-Include-Phased-Updates=true upgrade -y + fi echo -e "\n${OR}--- APT CLEANING ---${CL}" ssh "$IP" apt-get --purge autoremove -y EXTRAS @@ -648,7 +661,11 @@ UPDATE_VM_QEMU () { echo -e "${OR}--- APT UPDATE ---${CL}" qm guest exec "$VM" -- bash -c "apt-get update" | tail -n +4 | head -n -1 | cut -c 17- echo -e "\n${OR}--- APT UPGRADE ---${CL}" - qm guest exec "$VM" --timeout 120 -- bash -c "apt-get upgrade -y" | tail -n +2 | head -n -1 + if [[ "$INCLUDE_PHASED_UPDATES" != "true" ]]; then + qm guest exec "$VM" --timeout 120 -- bash -c "apt-get upgrade -y" | tail -n +2 | head -n -1 + else + qm guest exec "$VM" --timeout 120 -- bash -c "apt-get -o APT::Get::Always-Include-Phased-Updates=true upgrade -y" | tail -n +2 | head -n -1 + fi echo -e "\n${OR}--- APT CLEANING ---${CL}" qm guest exec "$VM" -- bash -c "apt-get --purge autoremove -y" | tail -n +4 | head -n -1 | cut -c 17- echo From 2eb20c25ee0d6b62f85b4fd3babcd6e2ef05d60e Mon Sep 17 00:00:00 2001 From: Uruk <68083474+Uruknara@users.noreply.github.com> Date: Tue, 18 Jul 2023 23:24:51 +0200 Subject: [PATCH 20/74] Fix disutils error when upgrading octoprint --- update-extras.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-extras.sh b/update-extras.sh index 9c6dfaa..64ddcfa 100644 --- a/update-extras.sh +++ b/update-extras.sh @@ -74,7 +74,7 @@ if [[ -d "/root/OctoPrint" && $OCTOPRINT == true ]]; then echo -e "\n*** Updating Octoprint ***\n" # find octoprint OPRINT=$(find /home -name "oprint") - "$OPRINT"/bin/pip install -U octoprint + "$OPRINT"/bin/pip install -U --ignore-installed octoprint sudo service octoprint restart fi From 526357816f9b3d29958a9a244fb0d5e65d2e7181 Mon Sep 17 00:00:00 2001 From: Uruk <68083474+Uruknara@users.noreply.github.com> Date: Tue, 18 Jul 2023 23:27:04 +0200 Subject: [PATCH 21/74] Update update.sh --- update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index f606054..2b5635c 100644 --- a/update.sh +++ b/update.sh @@ -210,7 +210,7 @@ VERSION_CHECK () { if [[ "$BRANCH" == beta ]]; then echo -e "\n${OR} *** You are on beta branch ***${CL}" elif [[ "$BRANCH" == develop ]]; then - echo -e "\n${OR} *** You are on develop branch ***${CL}" + echo -e "\n${OR} *** You are on develop branch ***${CL}" fi if [[ "$SERVER_VERSION" > "$VERSION" ]]; then echo -e "\n${OR} *** A newer version is available ***${CL}\n\ @@ -227,7 +227,7 @@ VERSION_CHECK () { elif [[ "$BRANCH" == master ]]; then echo -e " ${GN}Script is UpToDate${CL}" fi - if [[ "$VERSION_NOT_SHOW" != true ]]; then echo -e " Version: $VERSION\n"; fi + if [[ "$VERSION_NOT_SHOW" != true ]]; then echo -e " Version: $VERSION\n"; fi rm -rf /root/Proxmox-Updater/temp/update.sh && echo } From c14bbfd7f78dc83aa08f14c03514044933c2c84d Mon Sep 17 00:00:00 2001 From: Uruk <68083474+Uruknara@users.noreply.github.com> Date: Tue, 18 Jul 2023 23:28:47 +0200 Subject: [PATCH 22/74] Update update.sh --- update.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/update.sh b/update.sh index 2b5635c..91c4d8e 100644 --- a/update.sh +++ b/update.sh @@ -25,19 +25,19 @@ CL="\e[0m" HEADER_INFO () { clear echo -e "\n \ - https://github.com/BassT23/Proxmox" + https://github.com/BassT23/Proxmox" cat <<'EOF' - ____ - / __ \_________ _ ______ ___ ____ _ __ - / /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ - / ____/ / / /_/ /> < - /_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| - __ __ __ __ - / / / /___ ____/ /___ _/ /____ ____ - / / / / __ \/ __ / __ `/ __/ _ \/ __/ - / /_/ / /_/ / /_/ / /_/ / /_/ __/ / - \____/ .___/\____/\____/\__/\___/_/ - /_/ + ____ + / __ \_________ _ ______ ___ ____ _ __ + / /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ + / ____/ / / /_/ /> < + /_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| + __ __ __ __ + / / / /___ ____/ /___ _/ /____ ____ + / / / / __ \/ __ / __ `/ __/ _ \/ __/ + / /_/ / /_/ / /_/ / /_/ / /_/ __/ / + \____/ .___/\____/\____/\__/\___/_/ + /_/ EOF if [[ "$INFO" != false ]]; then echo -e "\n \ @@ -210,7 +210,7 @@ VERSION_CHECK () { if [[ "$BRANCH" == beta ]]; then echo -e "\n${OR} *** You are on beta branch ***${CL}" elif [[ "$BRANCH" == develop ]]; then - echo -e "\n${OR} *** You are on develop branch ***${CL}" + echo -e "\n${OR} *** You are on develop branch ***${CL}" fi if [[ "$SERVER_VERSION" > "$VERSION" ]]; then echo -e "\n${OR} *** A newer version is available ***${CL}\n\ @@ -227,7 +227,7 @@ VERSION_CHECK () { elif [[ "$BRANCH" == master ]]; then echo -e " ${GN}Script is UpToDate${CL}" fi - if [[ "$VERSION_NOT_SHOW" != true ]]; then echo -e " Version: $VERSION\n"; fi + if [[ "$VERSION_NOT_SHOW" != true ]]; then echo -e " Version: $VERSION\n"; fi rm -rf /root/Proxmox-Updater/temp/update.sh && echo } From 79807af6744c980434899abc5e8afeefd322f959 Mon Sep 17 00:00:00 2001 From: Uruk <68083474+Uruknara@users.noreply.github.com> Date: Tue, 18 Jul 2023 23:30:31 +0200 Subject: [PATCH 23/74] Update update.sh --- update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index 91c4d8e..d4b0fb3 100644 --- a/update.sh +++ b/update.sh @@ -25,7 +25,7 @@ CL="\e[0m" HEADER_INFO () { clear echo -e "\n \ - https://github.com/BassT23/Proxmox" + https://github.com/BassT23/Proxmox" cat <<'EOF' ____ / __ \_________ _ ______ ___ ____ _ __ @@ -208,9 +208,9 @@ VERSION_CHECK () { curl -s $SERVER_URL/update.sh > /root/Proxmox-Updater/temp/update.sh SERVER_VERSION=$(awk -F'"' '/^VERSION=/ {print $2}' /root/Proxmox-Updater/temp/update.sh) if [[ "$BRANCH" == beta ]]; then - echo -e "\n${OR} *** You are on beta branch ***${CL}" + echo -e "\n${OR} *** Currently on beta branch ***${CL}" elif [[ "$BRANCH" == develop ]]; then - echo -e "\n${OR} *** You are on develop branch ***${CL}" + echo -e "\n${OR} *** Currently on develop branch ***${CL}" fi if [[ "$SERVER_VERSION" > "$VERSION" ]]; then echo -e "\n${OR} *** A newer version is available ***${CL}\n\ From 75af536b40cd9caedbc27cf6f5657aa84bf7617e Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Wed, 19 Jul 2023 22:43:30 +0200 Subject: [PATCH 24/74] Update change.log --- change.log | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/change.log b/change.log index 88e914c..93222e3 100644 --- a/change.log +++ b/change.log @@ -1,8 +1,10 @@ Changelog: ========== -**v3.8.5** (beta) +**v3.8.6** (develop) +- check for updates on excluded (see in config file) +**v3.8.5** (18.06.2023) - Skip node, if not reachable - check internet status - will always use master version @@ -10,14 +12,12 @@ Changelog: - fix version info **v3.8.4** (01.04.2023) - - Speed up start in cluster mode - Speed up installation - Bug fixing - Code cleaning **v3.8** (28.03.2023) - - Add SSH Connection for VM - with extra update support - Add "Global Extra" in config file, for disable/enable Extra Updates - Info, if you are on beta/development version @@ -31,7 +31,6 @@ Changelog: - Add "reboot required" **v3.7** (09.03.2023) - - Fixing code - Support "only" LXC/VM - Fix docker-compose update @@ -40,64 +39,51 @@ Changelog: - Need neofetch (will install automatic) **v3.6** (22.02.2023) - - Add config file - Cleaning code - More colorful - Fixing logging **v3.4** (not released) - - Add VM Update - Cleaning code - Fixed Docker Update **v3.3** (15.02.2023) - - Add Update Info - Add extra Updates - Add version check by user **v3.1.1** (13.02.2023) - - Fixed update failure with CentOS **v3.1** (12.02.2023) - - Add better usage - Cleanup overall code **v3.0** (10.02.2023) - - Implement single install url **v2.8** (09.02.2023) - - Cleanup overall code **v2.7.1** (06.02.2023) - - Small fixes **v2.7** (31.01.2023) - - Add root check - Cleanup overall code **v2.6** (30.01.2023) - - Cleanup overall code - Fix promt of update - Add updating package that been kept back **v2.5** (30.01.2023) - - Added "Headless Mode" as option with `update -3` otherwise runs in "Interactive Mode" **v2.4** (29.01.2023) - - Visual and Name changes **v2.3** (29.01.2023) - - Update script itself with `update -u` From f25842ba42bdd04969ae03b1f476d644cf8b3910 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Wed, 19 Jul 2023 22:48:46 +0200 Subject: [PATCH 25/74] Update change.log --- change.log | 1 + 1 file changed, 1 insertion(+) diff --git a/change.log b/change.log index 93222e3..45b61f5 100644 --- a/change.log +++ b/change.log @@ -3,6 +3,7 @@ Changelog: **v3.8.6** (develop) - check for updates on excluded (see in config file) +- include phased updates (change "INCLUDE_PHASED_UPDATES" false to true, or comment line out) **v3.8.5** (18.06.2023) - Skip node, if not reachable From fe0a6d57f7fc03a061f47fc030ae3124e22d650c Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Wed, 19 Jul 2023 22:50:47 +0200 Subject: [PATCH 26/74] Update update.conf --- update.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/update.conf b/update.conf index 2862e82..4fd97fd 100644 --- a/update.conf +++ b/update.conf @@ -21,6 +21,9 @@ STOPPED_CONTAINER="true" RUNNING_CONTAINER="true" INCLUDE_KERNEL="true" + +# Infos about phased updates here: +# https://ubuntu.com/server/docs/about-apt-upgrade-and-phased-updates INCLUDE_PHASED_UPDATES="false" ################################################ From 0b2be08409ef09cee65a896723ea8b720e74d6f5 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Wed, 19 Jul 2023 22:53:59 +0200 Subject: [PATCH 27/74] Update change.log --- change.log | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/change.log b/change.log index 45b61f5..2433625 100644 --- a/change.log +++ b/change.log @@ -2,8 +2,9 @@ Changelog: ========== **v3.8.6** (develop) -- check for updates on excluded (see in config file) -- include phased updates (change "INCLUDE_PHASED_UPDATES" false to true, or comment line out) +- config file: + - check for updates on excluded + - include phased updates **v3.8.5** (18.06.2023) - Skip node, if not reachable From db4bf29ebf0f6c0f08fcad7ab072f8e68aa66d25 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Thu, 20 Jul 2023 12:38:45 +0200 Subject: [PATCH 28/74] check internet for each Container/VM --- update.sh | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/update.sh b/update.sh index d4b0fb3..c63c494 100644 --- a/update.sh +++ b/update.sh @@ -25,19 +25,19 @@ CL="\e[0m" HEADER_INFO () { clear echo -e "\n \ - https://github.com/BassT23/Proxmox" + https://github.com/BassT23/Proxmox" cat <<'EOF' - ____ - / __ \_________ _ ______ ___ ____ _ __ - / /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ - / ____/ / / /_/ /> < - /_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| - __ __ __ __ - / / / /___ ____/ /___ _/ /____ ____ - / / / / __ \/ __ / __ `/ __/ _ \/ __/ - / /_/ / /_/ / /_/ / /_/ / /_/ __/ / - \____/ .___/\____/\____/\__/\___/_/ - /_/ + ____ + / __ \_________ _ ______ ___ ____ _ __ + / /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ + / ____/ / / /_/ /> < + /_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| + __ __ __ __ + / / / /___ ____/ /___ _/ /____ ____ + / / / / __ \/ __ / __ `/ __/ _ \/ __/ + / /_/ / /_/ / /_/ / /_/ / /_/ __/ / + \____/ .___/\____/\____/\__/\___/_/ + /_/ EOF if [[ "$INFO" != false ]]; then echo -e "\n \ @@ -208,9 +208,9 @@ VERSION_CHECK () { curl -s $SERVER_URL/update.sh > /root/Proxmox-Updater/temp/update.sh SERVER_VERSION=$(awk -F'"' '/^VERSION=/ {print $2}' /root/Proxmox-Updater/temp/update.sh) if [[ "$BRANCH" == beta ]]; then - echo -e "\n${OR} *** Currently on beta branch ***${CL}" + echo -e "\n${OR} *** You are on beta branch ***${CL}" elif [[ "$BRANCH" == develop ]]; then - echo -e "\n${OR} *** Currently on develop branch ***${CL}" + echo -e "\n${OR} *** You are on develop branch ***${CL}" fi if [[ "$SERVER_VERSION" > "$VERSION" ]]; then echo -e "\n${OR} *** A newer version is available ***${CL}\n\ @@ -227,7 +227,7 @@ VERSION_CHECK () { elif [[ "$BRANCH" == master ]]; then echo -e " ${GN}Script is UpToDate${CL}" fi - if [[ "$VERSION_NOT_SHOW" != true ]]; then echo -e " Version: $VERSION\n"; fi + if [[ "$VERSION_NOT_SHOW" != true ]]; then echo -e " Version: $VERSION\n"; fi rm -rf /root/Proxmox-Updater/temp/update.sh && echo } @@ -491,6 +491,11 @@ UPDATE_CONTAINER () { NAME=$(pct exec "$CONTAINER" hostname) fi echo -e "${BL}[Info]${GN} Updating LXC ${BL}$CONTAINER${CL} : ${GN}$NAME${CL}\n" + # Check Internet connection + if ! pct exec "$CONTAINER" -- bash -c "ping -q -c1 google.com &>/dev/null"; then + echo -e "${OR} Internet is not reachable - skip update${CL}\n" + return + fi if [[ "$OS" =~ ubuntu ]] || [[ "$OS" =~ debian ]] || [[ "$OS" =~ devuan ]]; then echo -e "${OR}--- APT UPDATE ---${CL}" pct exec "$CONTAINER" -- bash -c "apt-get update" @@ -553,7 +558,7 @@ VM_UPDATE_START () { else STATUS=$(qm status "$VM") if [[ "$STATUS" == "status: stopped" && "$STOPPED" == true ]]; then - # Check if update is possiple + # Check if update is possible if [[ $(qm config "$VM" | grep 'agent:' | sed 's/agent:\s*//') == 1 ]] || [[ -f /root/Proxmox-Updater/VMs/"$VM" ]]; then # Start the VM WILL_STOP="true" @@ -604,6 +609,11 @@ UPDATE_VM () { if [[ "$OS_BASE" =~ l2 ]]; then OS=$(ssh "$IP" hostnamectl | grep System) if [[ "$OS" =~ Ubuntu ]] || [[ "$OS" =~ Debian ]] || [[ "$OS" =~ Devuan ]]; then + # Check Internet connection + if ! ssh "$IP" "ping -q -c1 google.com &>/dev/null"; then + echo -e "${OR} Internet is not reachable - skip update${CL}\n" + return + fi echo -e "${OR}--- APT UPDATE ---${CL}" ssh "$IP" apt-get update echo -e "\n${OR}--- APT UPGRADE ---${CL}" @@ -658,6 +668,11 @@ UPDATE_VM_QEMU () { Please look here: \n" OS=$(qm guest cmd "$VM" get-osinfo | grep name) if [[ "$OS" =~ Ubuntu ]] || [[ "$OS" =~ Debian ]] || [[ "$OS" =~ Devuan ]]; then + # Check Internet connection + if ! qm guest exec "$VM" -- bash -c "ping -q -c1 google.com &>/dev/null"; then + echo -e "${OR} Internet is not reachable - skip update${CL}\n" + return + fi echo -e "${OR}--- APT UPDATE ---${CL}" qm guest exec "$VM" -- bash -c "apt-get update" | tail -n +4 | head -n -1 | cut -c 17- echo -e "\n${OR}--- APT UPGRADE ---${CL}" From 520e2b6b53ef695b6ff867583264ee0b90bf8d63 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Thu, 20 Jul 2023 12:46:27 +0200 Subject: [PATCH 29/74] Update change.log --- change.log | 1 + 1 file changed, 1 insertion(+) diff --git a/change.log b/change.log index 2433625..7433ff7 100644 --- a/change.log +++ b/change.log @@ -2,6 +2,7 @@ Changelog: ========== **v3.8.6** (develop) +- check internet connection on each LXC/VM - config file: - check for updates on excluded - include phased updates From 609a1928617fe513b62c7a1f3682dea06189cad9 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 21 Jul 2023 08:00:06 +0200 Subject: [PATCH 30/74] Update update.sh --- update.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/update.sh b/update.sh index c63c494..11a8dde 100644 --- a/update.sh +++ b/update.sh @@ -63,7 +63,7 @@ CHECK_ROOT () { # Check internet status CHECK_INTERNET () { - if ! ping -q -c1 google.com &>/dev/null; then + if ! ping -q -c1 "$CHECK_URL" &>/dev/null; then echo -e "\n${OR} You are offline - Can't update without internet${CL}\n" exit 2 fi @@ -315,6 +315,7 @@ STATUS () { # Read Config File READ_CONFIG () { CHECK_VERSION=$(awk -F'"' '/^VERSION_CHECK=/ {print $2}' "$CONFIG_FILE") + CHECK_URL=$(awk -F'"' '/^URL_FOR_INTERNET_CHECK=/ {print $2}' "$CONFIG_FILE") WITH_HOST=$(awk -F'"' '/^WITH_HOST=/ {print $2}' "$CONFIG_FILE") WITH_LXC=$(awk -F'"' '/^WITH_LXC=/ {print $2}' "$CONFIG_FILE") WITH_VM=$(awk -F'"' '/^WITH_VM=/ {print $2}' "$CONFIG_FILE") @@ -492,7 +493,7 @@ UPDATE_CONTAINER () { fi echo -e "${BL}[Info]${GN} Updating LXC ${BL}$CONTAINER${CL} : ${GN}$NAME${CL}\n" # Check Internet connection - if ! pct exec "$CONTAINER" -- bash -c "ping -q -c1 google.com &>/dev/null"; then + if ! pct exec "$CONTAINER" -- bash -c "ping -q -c1 "$CHECK_URL" &>/dev/null"; then echo -e "${OR} Internet is not reachable - skip update${CL}\n" return fi @@ -610,7 +611,7 @@ UPDATE_VM () { OS=$(ssh "$IP" hostnamectl | grep System) if [[ "$OS" =~ Ubuntu ]] || [[ "$OS" =~ Debian ]] || [[ "$OS" =~ Devuan ]]; then # Check Internet connection - if ! ssh "$IP" "ping -q -c1 google.com &>/dev/null"; then + if ! ssh "$IP" "ping -q -c1 "$CHECK_URL" &>/dev/null"; then echo -e "${OR} Internet is not reachable - skip update${CL}\n" return fi @@ -669,7 +670,7 @@ UPDATE_VM_QEMU () { OS=$(qm guest cmd "$VM" get-osinfo | grep name) if [[ "$OS" =~ Ubuntu ]] || [[ "$OS" =~ Debian ]] || [[ "$OS" =~ Devuan ]]; then # Check Internet connection - if ! qm guest exec "$VM" -- bash -c "ping -q -c1 google.com &>/dev/null"; then + if ! qm guest exec "$VM" -- bash -c "ping -q -c1 "$CHECK_URL" &>/dev/null"; then echo -e "${OR} Internet is not reachable - skip update${CL}\n" return fi From 75c80f7529d850fe7b40a424dea7eb359017be84 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 21 Jul 2023 08:00:32 +0200 Subject: [PATCH 31/74] Update update.conf --- update.conf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/update.conf b/update.conf index 4fd97fd..eb3e479 100644 --- a/update.conf +++ b/update.conf @@ -5,9 +5,9 @@ # change 'true' or commend out with '#' # ################################################ -VERSION="1.2" - +VERSION="1.3" VERSION_CHECK="true" +URL_FOR_INTERNET_CHECK="google.com" ################################################ # Host / LXC / VM # @@ -21,9 +21,6 @@ STOPPED_CONTAINER="true" RUNNING_CONTAINER="true" INCLUDE_KERNEL="true" - -# Infos about phased updates here: -# https://ubuntu.com/server/docs/about-apt-upgrade-and-phased-updates INCLUDE_PHASED_UPDATES="false" ################################################ From af00fbc4bb01ad9b0ec8d77e0622dcb442a17edc Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 21 Jul 2023 11:45:22 +0200 Subject: [PATCH 32/74] prepare beta --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0721c80..998babd 100644 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ VERSION="1.6.6" # Branch -BRANCH="develop" +BRANCH="beta" # Variable / Function LOCAL_FILES="/root/Proxmox-Updater" From b7921b78523f3ddd72699242dc6b7ecc7e226d34 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 21 Jul 2023 11:46:03 +0200 Subject: [PATCH 33/74] prepare beta --- change.log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change.log b/change.log index 7433ff7..b2d23b5 100644 --- a/change.log +++ b/change.log @@ -1,7 +1,7 @@ Changelog: ========== -**v3.8.6** (develop) +**v3.8.6** (beta) - check internet connection on each LXC/VM - config file: - check for updates on excluded From 3d4cee3ebe722fd349bdb0093e8415a345e5a4dc Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 21 Jul 2023 11:46:37 +0200 Subject: [PATCH 34/74] prepare beta --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 11a8dde..7af328a 100644 --- a/update.sh +++ b/update.sh @@ -7,7 +7,7 @@ VERSION="3.8.6" # Branch -BRANCH="develop" +BRANCH="beta" # Variable / Function LOG_FILE=/var/log/update-"$HOSTNAME".log # <- change location for logfile if you want From 04e8b0368bce01b4343af3be46863229fe2c7d5a Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 21 Jul 2023 11:46:50 +0200 Subject: [PATCH 35/74] prepare beta --- welcome-screen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/welcome-screen.sh b/welcome-screen.sh index ee08a90..7c936c8 100644 --- a/welcome-screen.sh +++ b/welcome-screen.sh @@ -7,7 +7,7 @@ VERSION="1.3.2" # Branch -BRANCH="develop" +BRANCH="beta" # Variable / Function CONFIG_FILE="/root/Proxmox-Updater/update.conf" From 1a8feaad22b1b49bad49663af520cf0bb07eee1d Mon Sep 17 00:00:00 2001 From: elbim Date: Fri, 8 Sep 2023 10:42:33 +0200 Subject: [PATCH 36/74] Add snapshot functionality Add snapshot variable to enable/disable functionality to config Add snapshot function and function calls in updater script --- update.conf | 2 ++ update.sh | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/update.conf b/update.conf index eb3e479..836ba4c 100644 --- a/update.conf +++ b/update.conf @@ -23,6 +23,8 @@ RUNNING_CONTAINER="true" INCLUDE_KERNEL="true" INCLUDE_PHASED_UPDATES="false" +SNAPSHOT="true" # Enables snapshots before update. Set false to disable function + ################################################ # Extra Updates # ################################################ diff --git a/update.sh b/update.sh index 7af328a..68ddb18 100644 --- a/update.sh +++ b/update.sh @@ -323,6 +323,7 @@ READ_CONFIG () { STOPPED=$(awk -F'"' '/^STOPPED_CONTAINER=/ {print $2}' "$CONFIG_FILE") INCLUDE_KERNEL=$(awk -F'"' '/^INCLUDE_KERNEL=/ {print $2}' "$CONFIG_FILE") INCLUDE_PHASED_UPDATES=$(awk -F'"' '/^INCLUDE_PHASED_UPDATES=/ {print $2}' "$CONFIG_FILE") + SNAPSHOT=$(awk -F'"' '/^SNAPSHOT=/ {print $2}' "$CONFIG_FILE") EXTRA_GLOBAL=$(awk -F'"' '/^EXTRA_GLOBAL=/ {print $2}' "$CONFIG_FILE") EXTRA_IN_HEADLESS=$(awk -F'"' '/^IN_HEADLESS_MODE=/ {print $2}' "$CONFIG_FILE") EXCLUDED=$(awk -F'"' '/^EXCLUDE=/ {print $2}' "$CONFIG_FILE") @@ -442,6 +443,18 @@ UPDATE_HOST_ITSELF () { CHOST="" } +# Container Snapshot +CONTAINER_SNAPSHOT () { + echo -e "${BL}[Info] Creating snapshot for container $CONTAINER{CL}\n\n" + pct snapshot $CONTAINER "Update_$(date '+%Y%m%d_%H%M%S')" +} + +# Container Snapshot +VM_SNAPSHOT () { + echo -e "${BL}[Info] Creating snapshot for VM $VM{CL}\n\n" + qm snapshot $VM "Update_$(date '+%Y%m%d_%H%M%S')" +} + ## Container ## # Container Update Start CONTAINER_UPDATE_START () { @@ -458,6 +471,7 @@ CONTAINER_UPDATE_START () { if [[ "$STATUS" == "status: stopped" && "$STOPPED" == true ]]; then # Start the container WILL_STOP="true" + CONTAINER_SNAPSHOT echo -e "${BL}[Info]${GN} Starting LXC${BL} $CONTAINER ${CL}" pct start "$CONTAINER" echo -e "${BL}[Info]${GN} Waiting for LXC${BL} $CONTAINER${CL}${GN} to start ${CL}" @@ -470,6 +484,7 @@ CONTAINER_UPDATE_START () { elif [[ "$STATUS" == "status: stopped" && "$STOPPED" != true ]]; then echo -e "${BL}[Info] Skipped LXC $CONTAINER by user${CL}\n\n" elif [[ "$STATUS" == "status: running" && "$RUNNING" == true ]]; then + CONTAINER_SNAPSHOT UPDATE_CONTAINER "$CONTAINER" elif [[ "$STATUS" == "status: running" && "$RUNNING" != true ]]; then echo -e "${BL}[Info] Skipped LXC $CONTAINER by user${CL}\n\n" @@ -563,6 +578,7 @@ VM_UPDATE_START () { if [[ $(qm config "$VM" | grep 'agent:' | sed 's/agent:\s*//') == 1 ]] || [[ -f /root/Proxmox-Updater/VMs/"$VM" ]]; then # Start the VM WILL_STOP="true" + VM_SNAPSHOT echo -e "${BL}[Info]${GN} Starting VM${BL} $VM ${CL}" qm start "$VM" >/dev/null 2>&1 echo -e "${BL}[Info]${GN} Waiting for VM${BL} $VM${CL}${GN} to start${CL}" @@ -580,6 +596,7 @@ VM_UPDATE_START () { elif [[ "$STATUS" == "status: stopped" && "$STOPPED" != true ]]; then echo -e "${BL}[Info] Skipped VM $VM by user${CL}\n\n" elif [[ "$STATUS" == "status: running" && "$RUNNING" == true ]]; then + VM_SNAPSHOT UPDATE_VM "$VM" elif [[ "$STATUS" == "status: running" && "$RUNNING" != true ]]; then echo -e "${BL}[Info] Skipped VM $VM by user${CL}\n\n" From 8e90dde20bdaf20886bc8b970c3aed4c5783dfb4 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:19:16 +0200 Subject: [PATCH 37/74] Update update.sh --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 68ddb18..5322773 100644 --- a/update.sh +++ b/update.sh @@ -4,7 +4,7 @@ # Update # ########## -VERSION="3.8.6" +VERSION="3.8.7" # Branch BRANCH="beta" From f028e93fca80abf9ff3977ff1c94858aa65ecd38 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:20:57 +0200 Subject: [PATCH 38/74] Update update.conf --- update.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.conf b/update.conf index 836ba4c..d32b783 100644 --- a/update.conf +++ b/update.conf @@ -23,7 +23,7 @@ RUNNING_CONTAINER="true" INCLUDE_KERNEL="true" INCLUDE_PHASED_UPDATES="false" -SNAPSHOT="true" # Enables snapshots before update. Set false to disable function +SNAPSHOT="true" #enables backup before update ################################################ # Extra Updates # From 42983e7d9d1993da64d86c9f3e14582964ce2dad Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:22:48 +0200 Subject: [PATCH 39/74] Update change.log --- change.log | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/change.log b/change.log index b2d23b5..6c29059 100644 --- a/change.log +++ b/change.log @@ -1,11 +1,12 @@ Changelog: ========== -**v3.8.6** (beta) +**v3.8.7** (beta) - check internet connection on each LXC/VM - config file: - check for updates on excluded - include phased updates +- make snapshot from LXC/VM before update (thanks to @elbim) **v3.8.5** (18.06.2023) - Skip node, if not reachable From 78849965cee8cfd27c77478d1ec95ddcdbb1f3ab Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:31:44 +0200 Subject: [PATCH 40/74] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2619b8c..aac284b 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ Changelog: [here](https://github.com/BassT23/Proxmox/blob/beta/change.log) ### What does the script do: - The script make system updates with apt/dnf/pacman/apk or yum on all nodes/LXCs and VMs (if VMs prepared for that) +- Before the LXC/VM update start, there will be made a snapshot. This can be disabled in `update.conf` - After that it makes an little cleaning (like `apt autoremove`) - If the script detects "extra" installations, it could update this also. (look in config file, for this) @@ -150,4 +151,4 @@ To go back to master, choose `update -up` [![grafik](https://user-images.githubusercontent.com/30832786/227482640-e7800e89-32a6-44fc-ad3b-43eef5cdc4d4.png)](https://ko-fi.com/basst) # Credits: -[@Uruk](https://github.com/Uruknara) - for help with the code +[@Uruk](https://github.com/Uruknara) / [@elbim](https://github.com/elbim) From 938a2c675fb19dbc1e8216e0164fe033249f7a79 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:37:00 +0200 Subject: [PATCH 41/74] Update update.sh --- update.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/update.sh b/update.sh index 5322773..dbb4852 100644 --- a/update.sh +++ b/update.sh @@ -330,6 +330,17 @@ READ_CONFIG () { ONLY=$(awk -F'"' '/^ONLY=/ {print $2}' "$CONFIG_FILE") } +# Snapshot +CONTAINER_SNAPSHOT () { + echo -e "${BL}[Info] Creating snapshot for container $CONTAINER{CL}\n\n" + pct snapshot $CONTAINER "Update_$(date '+%Y%m%d_%H%M%S')" +} + +VM_SNAPSHOT () { + echo -e "${BL}[Info] Creating snapshot for VM $VM{CL}\n\n" + qm snapshot $VM "Update_$(date '+%Y%m%d_%H%M%S')" +} + # Extras EXTRAS () { if [[ "$EXTRA_GLOBAL" != true ]]; then @@ -443,18 +454,6 @@ UPDATE_HOST_ITSELF () { CHOST="" } -# Container Snapshot -CONTAINER_SNAPSHOT () { - echo -e "${BL}[Info] Creating snapshot for container $CONTAINER{CL}\n\n" - pct snapshot $CONTAINER "Update_$(date '+%Y%m%d_%H%M%S')" -} - -# Container Snapshot -VM_SNAPSHOT () { - echo -e "${BL}[Info] Creating snapshot for VM $VM{CL}\n\n" - qm snapshot $VM "Update_$(date '+%Y%m%d_%H%M%S')" -} - ## Container ## # Container Update Start CONTAINER_UPDATE_START () { From 951d2144f7b5f4839d494a1da47272ca930992ac Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:43:46 +0200 Subject: [PATCH 42/74] Add Discord Link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index aac284b..7d59472 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ [![GitHub release](https://img.shields.io/github/release/BassT23/Proxmox.svg)](https://GitHub.com/BassT23/Proxmox/releases/) [![GitHub stars](https://img.shields.io/github/stars/BassT23/Proxmox.svg)](https://github.com/BassT23/Proxmox/stargazers) [![downloads](https://img.shields.io/github/downloads/BassT23/Proxmox/total.svg)](https://github.com/BassT23/Proxmox/releases) +[![Discord](https://dcbadge.vercel.app/api/server/Bv2dnk5F?style=flat)](https://discord.gg/Bv2dnk5F) + Proxmox® is a registered trademark of Proxmox Server Solutions GmbH. From 6ae71cce4ed750967ced77b3d094e65c2999895b Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:43:15 +0200 Subject: [PATCH 43/74] Modify snaphots - don't work at all --- update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index dbb4852..0ab1ef1 100644 --- a/update.sh +++ b/update.sh @@ -332,12 +332,12 @@ READ_CONFIG () { # Snapshot CONTAINER_SNAPSHOT () { - echo -e "${BL}[Info] Creating snapshot for container $CONTAINER{CL}\n\n" + echo -e "${BL}[Info] Try to create snapshot for container $CONTAINER{CL}\n" pct snapshot $CONTAINER "Update_$(date '+%Y%m%d_%H%M%S')" } VM_SNAPSHOT () { - echo -e "${BL}[Info] Creating snapshot for VM $VM{CL}\n\n" + echo -e "${BL}[Info] Try to create snapshot for VM $VM{CL}\n" qm snapshot $VM "Update_$(date '+%Y%m%d_%H%M%S')" } From bcaf2ecb5bd6881733f1ffe999c15bb5742ef357 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:50:52 +0200 Subject: [PATCH 44/74] disable snapshot for now need more fixing --- update.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/update.sh b/update.sh index 0ab1ef1..8812523 100644 --- a/update.sh +++ b/update.sh @@ -470,7 +470,6 @@ CONTAINER_UPDATE_START () { if [[ "$STATUS" == "status: stopped" && "$STOPPED" == true ]]; then # Start the container WILL_STOP="true" - CONTAINER_SNAPSHOT echo -e "${BL}[Info]${GN} Starting LXC${BL} $CONTAINER ${CL}" pct start "$CONTAINER" echo -e "${BL}[Info]${GN} Waiting for LXC${BL} $CONTAINER${CL}${GN} to start ${CL}" @@ -577,7 +576,6 @@ VM_UPDATE_START () { if [[ $(qm config "$VM" | grep 'agent:' | sed 's/agent:\s*//') == 1 ]] || [[ -f /root/Proxmox-Updater/VMs/"$VM" ]]; then # Start the VM WILL_STOP="true" - VM_SNAPSHOT echo -e "${BL}[Info]${GN} Starting VM${BL} $VM ${CL}" qm start "$VM" >/dev/null 2>&1 echo -e "${BL}[Info]${GN} Waiting for VM${BL} $VM${CL}${GN} to start${CL}" From 7f78beb5b9d29b3553d9836f3993f50ac60449fb Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 20:47:38 +0200 Subject: [PATCH 45/74] disable backup function WIP --- update.sh | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/update.sh b/update.sh index 8812523..34f3b4d 100644 --- a/update.sh +++ b/update.sh @@ -330,15 +330,24 @@ READ_CONFIG () { ONLY=$(awk -F'"' '/^ONLY=/ {print $2}' "$CONFIG_FILE") } -# Snapshot -CONTAINER_SNAPSHOT () { - echo -e "${BL}[Info] Try to create snapshot for container $CONTAINER{CL}\n" - pct snapshot $CONTAINER "Update_$(date '+%Y%m%d_%H%M%S')" +# Backup +CONTAINER_BACKUP () { + vzdump $CONTAINER -mode snapshot --storage $(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1) || true + if [[ $? != 0 ]]; then + vzdump $CONTAINER --storage $(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1) + echo -e "${BL}[Info] Created backup for container $CONTAINER{CL}\n\n" + else + echo -e "${BL}[Info] Created snapshot for container $CONTAINER{CL}\n\n" + fi } - -VM_SNAPSHOT () { - echo -e "${BL}[Info] Try to create snapshot for VM $VM{CL}\n" - qm snapshot $VM "Update_$(date '+%Y%m%d_%H%M%S')" +VM_BACKUP () { + echo -e "${BL}[Info] Create snapshot for VM $VM${CL}" + if pct snapshot $VM "Update_$(date '+%Y%m%d_%H%M%S')"; then + vzdump $CONTAINER -mode snapshot --storage $(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1) + echo -e "${BL}[Info] Snapshot created${CL}\n" + else + echo -e "${RD}[Info] Snapshot not possible${CL}\n" + fi } # Extras @@ -470,19 +479,20 @@ CONTAINER_UPDATE_START () { if [[ "$STATUS" == "status: stopped" && "$STOPPED" == true ]]; then # Start the container WILL_STOP="true" - echo -e "${BL}[Info]${GN} Starting LXC${BL} $CONTAINER ${CL}" +# CONTAINER_BACKUP + echo -e "${BL}[Info]${GN} Starting LXC ${BL}$CONTAINER ${CL}" pct start "$CONTAINER" - echo -e "${BL}[Info]${GN} Waiting for LXC${BL} $CONTAINER${CL}${GN} to start ${CL}" + echo -e "${BL}[Info]${GN} Waiting for LXC ${BL}$CONTAINER${CL}${GN} to start ${CL}" sleep 5 UPDATE_CONTAINER "$CONTAINER" # Stop the container - echo -e "${BL}[Info]${GN} Shutting down LXC${BL} $CONTAINER ${CL}\n\n" + echo -e "${BL}[Info]${GN} Shutting down LXC ${BL}$CONTAINER ${CL}\n\n" pct shutdown "$CONTAINER" & WILL_STOP="false" elif [[ "$STATUS" == "status: stopped" && "$STOPPED" != true ]]; then echo -e "${BL}[Info] Skipped LXC $CONTAINER by user${CL}\n\n" elif [[ "$STATUS" == "status: running" && "$RUNNING" == true ]]; then - CONTAINER_SNAPSHOT +# CONTAINER_BACKUP UPDATE_CONTAINER "$CONTAINER" elif [[ "$STATUS" == "status: running" && "$RUNNING" != true ]]; then echo -e "${BL}[Info] Skipped LXC $CONTAINER by user${CL}\n\n" @@ -576,6 +586,7 @@ VM_UPDATE_START () { if [[ $(qm config "$VM" | grep 'agent:' | sed 's/agent:\s*//') == 1 ]] || [[ -f /root/Proxmox-Updater/VMs/"$VM" ]]; then # Start the VM WILL_STOP="true" +# VM_BACKUP echo -e "${BL}[Info]${GN} Starting VM${BL} $VM ${CL}" qm start "$VM" >/dev/null 2>&1 echo -e "${BL}[Info]${GN} Waiting for VM${BL} $VM${CL}${GN} to start${CL}" @@ -593,7 +604,7 @@ VM_UPDATE_START () { elif [[ "$STATUS" == "status: stopped" && "$STOPPED" != true ]]; then echo -e "${BL}[Info] Skipped VM $VM by user${CL}\n\n" elif [[ "$STATUS" == "status: running" && "$RUNNING" == true ]]; then - VM_SNAPSHOT +# VM_BACKUP UPDATE_VM "$VM" elif [[ "$STATUS" == "status: running" && "$RUNNING" != true ]]; then echo -e "${BL}[Info] Skipped VM $VM by user${CL}\n\n" From b1acf283d4762ec2876611682a8860b056d43a5f Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 21:44:12 +0200 Subject: [PATCH 46/74] add backup function --- update.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/update.sh b/update.sh index 34f3b4d..42565fe 100644 --- a/update.sh +++ b/update.sh @@ -323,7 +323,7 @@ READ_CONFIG () { STOPPED=$(awk -F'"' '/^STOPPED_CONTAINER=/ {print $2}' "$CONFIG_FILE") INCLUDE_KERNEL=$(awk -F'"' '/^INCLUDE_KERNEL=/ {print $2}' "$CONFIG_FILE") INCLUDE_PHASED_UPDATES=$(awk -F'"' '/^INCLUDE_PHASED_UPDATES=/ {print $2}' "$CONFIG_FILE") - SNAPSHOT=$(awk -F'"' '/^SNAPSHOT=/ {print $2}' "$CONFIG_FILE") + BACKUP=$(awk -F'"' '/^SNAPSHOT=/ {print $2}' "$CONFIG_FILE") EXTRA_GLOBAL=$(awk -F'"' '/^EXTRA_GLOBAL=/ {print $2}' "$CONFIG_FILE") EXTRA_IN_HEADLESS=$(awk -F'"' '/^IN_HEADLESS_MODE=/ {print $2}' "$CONFIG_FILE") EXCLUDED=$(awk -F'"' '/^EXCLUDE=/ {print $2}' "$CONFIG_FILE") @@ -332,22 +332,22 @@ READ_CONFIG () { # Backup CONTAINER_BACKUP () { - vzdump $CONTAINER -mode snapshot --storage $(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1) || true - if [[ $? != 0 ]]; then - vzdump $CONTAINER --storage $(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1) - echo -e "${BL}[Info] Created backup for container $CONTAINER{CL}\n\n" - else - echo -e "${BL}[Info] Created snapshot for container $CONTAINER{CL}\n\n" - fi + if [[ "$BACKUP" == true ]]; then + echo -e "${BL}[Info] Create backup for LXC $CONTAINER${CL}" + vzdump $CONTAINER --mode snapshot --storage $(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1) + echo -e "${BL}[Info] Snapshot created${CL}\n" + else + echo -e "${OR}[Info] Backup Skipped by user${CL}" + fi } VM_BACKUP () { - echo -e "${BL}[Info] Create snapshot for VM $VM${CL}" - if pct snapshot $VM "Update_$(date '+%Y%m%d_%H%M%S')"; then - vzdump $CONTAINER -mode snapshot --storage $(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1) - echo -e "${BL}[Info] Snapshot created${CL}\n" - else - echo -e "${RD}[Info] Snapshot not possible${CL}\n" - fi + if [[ "$BACKUP" == true ]]; then + echo -e "${BL}[Info] Create backup for VM $VM${CL}" + vzdump $VM --mode snapshot --storage $(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1) + echo -e "${BL}[Info] Snapshot created${CL}\n" + else + echo -e "${OR}[Info] Backup Skipped by user${CL}" + fi } # Extras From 1f378a84b44a3d010fe5aa75cf7aed0f2cfe9c36 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 21:46:43 +0200 Subject: [PATCH 47/74] Update update.sh --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 42565fe..d823bcf 100644 --- a/update.sh +++ b/update.sh @@ -323,7 +323,7 @@ READ_CONFIG () { STOPPED=$(awk -F'"' '/^STOPPED_CONTAINER=/ {print $2}' "$CONFIG_FILE") INCLUDE_KERNEL=$(awk -F'"' '/^INCLUDE_KERNEL=/ {print $2}' "$CONFIG_FILE") INCLUDE_PHASED_UPDATES=$(awk -F'"' '/^INCLUDE_PHASED_UPDATES=/ {print $2}' "$CONFIG_FILE") - BACKUP=$(awk -F'"' '/^SNAPSHOT=/ {print $2}' "$CONFIG_FILE") + BACKUP=$(awk -F'"' '/^BACKUP=/ {print $2}' "$CONFIG_FILE") EXTRA_GLOBAL=$(awk -F'"' '/^EXTRA_GLOBAL=/ {print $2}' "$CONFIG_FILE") EXTRA_IN_HEADLESS=$(awk -F'"' '/^IN_HEADLESS_MODE=/ {print $2}' "$CONFIG_FILE") EXCLUDED=$(awk -F'"' '/^EXCLUDE=/ {print $2}' "$CONFIG_FILE") From bdcddab67fecaa5e4bda152d6945dc727ea6d6de Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 8 Sep 2023 21:46:59 +0200 Subject: [PATCH 48/74] Update update.conf --- update.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.conf b/update.conf index d32b783..52d4345 100644 --- a/update.conf +++ b/update.conf @@ -23,7 +23,7 @@ RUNNING_CONTAINER="true" INCLUDE_KERNEL="true" INCLUDE_PHASED_UPDATES="false" -SNAPSHOT="true" #enables backup before update +BACKUP="true" #enables backup before update ################################################ # Extra Updates # From 0dd890c1cf8b1475341b94ea64d3b18bed4dc87a Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sat, 9 Sep 2023 08:38:52 +0200 Subject: [PATCH 49/74] Update update.sh --- update.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/update.sh b/update.sh index d823bcf..8adb759 100644 --- a/update.sh +++ b/update.sh @@ -337,7 +337,7 @@ CONTAINER_BACKUP () { vzdump $CONTAINER --mode snapshot --storage $(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1) echo -e "${BL}[Info] Snapshot created${CL}\n" else - echo -e "${OR}[Info] Backup Skipped by user${CL}" + echo -e "${OR}[Info] Backup Skipped by user for LXC $CONTAINER${CL}" fi } VM_BACKUP () { @@ -346,7 +346,7 @@ VM_BACKUP () { vzdump $VM --mode snapshot --storage $(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1) echo -e "${BL}[Info] Snapshot created${CL}\n" else - echo -e "${OR}[Info] Backup Skipped by user${CL}" + echo -e "${OR}[Info] Backup Skipped by user for LXC $CONTAINER${CL}" fi } @@ -479,7 +479,7 @@ CONTAINER_UPDATE_START () { if [[ "$STATUS" == "status: stopped" && "$STOPPED" == true ]]; then # Start the container WILL_STOP="true" -# CONTAINER_BACKUP + CONTAINER_BACKUP echo -e "${BL}[Info]${GN} Starting LXC ${BL}$CONTAINER ${CL}" pct start "$CONTAINER" echo -e "${BL}[Info]${GN} Waiting for LXC ${BL}$CONTAINER${CL}${GN} to start ${CL}" @@ -492,7 +492,7 @@ CONTAINER_UPDATE_START () { elif [[ "$STATUS" == "status: stopped" && "$STOPPED" != true ]]; then echo -e "${BL}[Info] Skipped LXC $CONTAINER by user${CL}\n\n" elif [[ "$STATUS" == "status: running" && "$RUNNING" == true ]]; then -# CONTAINER_BACKUP + CONTAINER_BACKUP UPDATE_CONTAINER "$CONTAINER" elif [[ "$STATUS" == "status: running" && "$RUNNING" != true ]]; then echo -e "${BL}[Info] Skipped LXC $CONTAINER by user${CL}\n\n" @@ -586,7 +586,7 @@ VM_UPDATE_START () { if [[ $(qm config "$VM" | grep 'agent:' | sed 's/agent:\s*//') == 1 ]] || [[ -f /root/Proxmox-Updater/VMs/"$VM" ]]; then # Start the VM WILL_STOP="true" -# VM_BACKUP + VM_BACKUP echo -e "${BL}[Info]${GN} Starting VM${BL} $VM ${CL}" qm start "$VM" >/dev/null 2>&1 echo -e "${BL}[Info]${GN} Waiting for VM${BL} $VM${CL}${GN} to start${CL}" @@ -604,7 +604,7 @@ VM_UPDATE_START () { elif [[ "$STATUS" == "status: stopped" && "$STOPPED" != true ]]; then echo -e "${BL}[Info] Skipped VM $VM by user${CL}\n\n" elif [[ "$STATUS" == "status: running" && "$RUNNING" == true ]]; then -# VM_BACKUP + VM_BACKUP UPDATE_VM "$VM" elif [[ "$STATUS" == "status: running" && "$RUNNING" != true ]]; then echo -e "${BL}[Info] Skipped VM $VM by user${CL}\n\n" From 99f800230281fb1bb96ca18779d9329553308362 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:04:46 +0200 Subject: [PATCH 50/74] Update check-updates.sh --- check-updates.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/check-updates.sh b/check-updates.sh index 1661864..3503f51 100644 --- a/check-updates.sh +++ b/check-updates.sh @@ -4,7 +4,7 @@ # Check Updates # ################# -VERSION="1.4.5" +VERSION="1.4.6" #Variable / Function CONFIG_FILE="/root/Proxmox-Updater/update.conf" @@ -361,8 +361,7 @@ else fi # Run -wget -q --spider http://google.com -if [ $? -eq 0 ]; then +if [ "$(wget -q --spider http://google.com)" -eq 0 ]; then READ_WRITE_CONFIG ARGUMENTS "$@" else From c0fdda105f2f9c76c11ee0234f76c28c80071e04 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:05:18 +0200 Subject: [PATCH 51/74] Update install.sh --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 998babd..7ed94a3 100644 --- a/install.sh +++ b/install.sh @@ -4,10 +4,10 @@ # Install # ########### -VERSION="1.6.6" +VERSION="1.6.7" # Branch -BRANCH="beta" +BRANCH="develop" # Variable / Function LOCAL_FILES="/root/Proxmox-Updater" From 1fb1609dbd8edcf83cc6e9c933e6eb3d99d10f29 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:05:45 +0200 Subject: [PATCH 52/74] Update update-extras.sh --- update-extras.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/update-extras.sh b/update-extras.sh index 64ddcfa..767dca9 100644 --- a/update-extras.sh +++ b/update-extras.sh @@ -4,7 +4,7 @@ # Update-Extras # ################# -VERSION="1.8.1" +VERSION="1.8.2" # Variables CONFIG_FILE="/root/Proxmox-Updater/update.conf" @@ -27,12 +27,12 @@ if [[ -d "/opt/iobroker" && $IOBROKER == true ]]; then echo "*** Update/Upgrade ioBroker ***" && iob update && iob upgrade -y && iob upgrade self -y && echo echo "*** Start ioBroker ***" && iob start && echo if [[ -d "/opt/iobroker/iobroker-data/radar2.admin" ]]; then - setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip $(eval readlink -f `which arp-scan`) - setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip $(eval readlink -f `which node`) - setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip $(eval readlink -f `which arp`) - setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip $(eval readlink -f `which hcitool`) - setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip $(eval readlink -f `which hciconfig`) - setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip $(eval readlink -f `which l2ping`) + setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip "$(eval readlink -f '$(which arp-scan)')" + setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip "$(eval readlink -f '$(which node)')" + setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip "$(eval readlink -f '$(which arp)')" + setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip "$(eval readlink -f '$(which hcitool)')" + setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip "$(eval readlink -f '$(which hciconfig)')" + setcap cap_net_admin,cap_net_raw,cap_net_bind_service=+eip "$(eval readlink -f '$(which l2ping)')" fi fi From 801e23dcb2f04dcf3eb89a7b23a073507e21e3e5 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:06:06 +0200 Subject: [PATCH 53/74] Update update.sh --- update.sh | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/update.sh b/update.sh index 7af328a..1f4cb19 100644 --- a/update.sh +++ b/update.sh @@ -4,10 +4,10 @@ # Update # ########## -VERSION="3.8.6" +VERSION="3.8.8" # Branch -BRANCH="beta" +BRANCH="develop" # Variable / Function LOG_FILE=/var/log/update-"$HOSTNAME".log # <- change location for logfile if you want @@ -323,12 +323,33 @@ READ_CONFIG () { STOPPED=$(awk -F'"' '/^STOPPED_CONTAINER=/ {print $2}' "$CONFIG_FILE") INCLUDE_KERNEL=$(awk -F'"' '/^INCLUDE_KERNEL=/ {print $2}' "$CONFIG_FILE") INCLUDE_PHASED_UPDATES=$(awk -F'"' '/^INCLUDE_PHASED_UPDATES=/ {print $2}' "$CONFIG_FILE") + BACKUP=$(awk -F'"' '/^BACKUP=/ {print $2}' "$CONFIG_FILE") EXTRA_GLOBAL=$(awk -F'"' '/^EXTRA_GLOBAL=/ {print $2}' "$CONFIG_FILE") EXTRA_IN_HEADLESS=$(awk -F'"' '/^IN_HEADLESS_MODE=/ {print $2}' "$CONFIG_FILE") EXCLUDED=$(awk -F'"' '/^EXCLUDE=/ {print $2}' "$CONFIG_FILE") ONLY=$(awk -F'"' '/^ONLY=/ {print $2}' "$CONFIG_FILE") } +# Backup +CONTAINER_BACKUP () { + if [[ "$BACKUP" == true ]]; then + echo -e "${BL}[Info] Create backup for LXC $CONTAINER${CL}" + vzdump "$CONTAINER" --mode snapshot --storage "$(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1)" + echo -e "${BL}[Info] Snapshot created${CL}\n" + else + echo -e "${OR}[Info] Backup Skipped by user for LXC $CONTAINER${CL}" + fi +} +VM_BACKUP () { + if [[ "$BACKUP" == true ]]; then + echo -e "${BL}[Info] Create backup for VM $VM${CL}" + vzdump "$VM" --mode snapshot --storage "$(pvesm status -content backup | grep -m 1 -v ^Name | cut -d ' ' -f1)" + echo -e "${BL}[Info] Snapshot created${CL}\n" + else + echo -e "${OR}[Info] Backup Skipped by user for LXC $CONTAINER${CL}" + fi +} + # Extras EXTRAS () { if [[ "$EXTRA_GLOBAL" != true ]]; then @@ -386,7 +407,7 @@ HOST_UPDATE_START () { if [[ "$RICM" != true ]]; then true > /root/Proxmox-Updater/check-output; fi for HOST in $HOSTS; do # Check if Host/Node is available - if ssh $HOST test >/dev/null 2>&1; [ $? -eq 255 ]; then + if ssh "$HOST" test >/dev/null 2>&1; [ $? -eq 255 ]; then echo -e "${BL}[Info] ${OR}Skip Host${CL} : ${GN}$HOST${CL} ${OR}- can't connect${CL}\n" else UPDATE_HOST "$HOST" @@ -458,18 +479,20 @@ CONTAINER_UPDATE_START () { if [[ "$STATUS" == "status: stopped" && "$STOPPED" == true ]]; then # Start the container WILL_STOP="true" - echo -e "${BL}[Info]${GN} Starting LXC${BL} $CONTAINER ${CL}" + CONTAINER_BACKUP + echo -e "${BL}[Info]${GN} Starting LXC ${BL}$CONTAINER ${CL}" pct start "$CONTAINER" - echo -e "${BL}[Info]${GN} Waiting for LXC${BL} $CONTAINER${CL}${GN} to start ${CL}" + echo -e "${BL}[Info]${GN} Waiting for LXC ${BL}$CONTAINER${CL}${GN} to start ${CL}" sleep 5 UPDATE_CONTAINER "$CONTAINER" # Stop the container - echo -e "${BL}[Info]${GN} Shutting down LXC${BL} $CONTAINER ${CL}\n\n" + echo -e "${BL}[Info]${GN} Shutting down LXC ${BL}$CONTAINER ${CL}\n\n" pct shutdown "$CONTAINER" & WILL_STOP="false" elif [[ "$STATUS" == "status: stopped" && "$STOPPED" != true ]]; then echo -e "${BL}[Info] Skipped LXC $CONTAINER by user${CL}\n\n" elif [[ "$STATUS" == "status: running" && "$RUNNING" == true ]]; then + CONTAINER_BACKUP UPDATE_CONTAINER "$CONTAINER" elif [[ "$STATUS" == "status: running" && "$RUNNING" != true ]]; then echo -e "${BL}[Info] Skipped LXC $CONTAINER by user${CL}\n\n" @@ -493,7 +516,7 @@ UPDATE_CONTAINER () { fi echo -e "${BL}[Info]${GN} Updating LXC ${BL}$CONTAINER${CL} : ${GN}$NAME${CL}\n" # Check Internet connection - if ! pct exec "$CONTAINER" -- bash -c "ping -q -c1 "$CHECK_URL" &>/dev/null"; then + if ! pct exec "$CONTAINER" -- bash -c "ping -q -c1 $CHECK_URL &>/dev/null"; then echo -e "${OR} Internet is not reachable - skip update${CL}\n" return fi @@ -563,6 +586,7 @@ VM_UPDATE_START () { if [[ $(qm config "$VM" | grep 'agent:' | sed 's/agent:\s*//') == 1 ]] || [[ -f /root/Proxmox-Updater/VMs/"$VM" ]]; then # Start the VM WILL_STOP="true" + VM_BACKUP echo -e "${BL}[Info]${GN} Starting VM${BL} $VM ${CL}" qm start "$VM" >/dev/null 2>&1 echo -e "${BL}[Info]${GN} Waiting for VM${BL} $VM${CL}${GN} to start${CL}" @@ -580,6 +604,7 @@ VM_UPDATE_START () { elif [[ "$STATUS" == "status: stopped" && "$STOPPED" != true ]]; then echo -e "${BL}[Info] Skipped VM $VM by user${CL}\n\n" elif [[ "$STATUS" == "status: running" && "$RUNNING" == true ]]; then + VM_BACKUP UPDATE_VM "$VM" elif [[ "$STATUS" == "status: running" && "$RUNNING" != true ]]; then echo -e "${BL}[Info] Skipped VM $VM by user${CL}\n\n" @@ -611,7 +636,7 @@ UPDATE_VM () { OS=$(ssh "$IP" hostnamectl | grep System) if [[ "$OS" =~ Ubuntu ]] || [[ "$OS" =~ Debian ]] || [[ "$OS" =~ Devuan ]]; then # Check Internet connection - if ! ssh "$IP" "ping -q -c1 "$CHECK_URL" &>/dev/null"; then + if ! ssh "$IP" "ping -q -c1 $CHECK_URL &>/dev/null"; then echo -e "${OR} Internet is not reachable - skip update${CL}\n" return fi @@ -670,7 +695,7 @@ UPDATE_VM_QEMU () { OS=$(qm guest cmd "$VM" get-osinfo | grep name) if [[ "$OS" =~ Ubuntu ]] || [[ "$OS" =~ Debian ]] || [[ "$OS" =~ Devuan ]]; then # Check Internet connection - if ! qm guest exec "$VM" -- bash -c "ping -q -c1 "$CHECK_URL" &>/dev/null"; then + if ! qm guest exec "$VM" -- bash -c "ping -q -c1 $CHECK_URL &>/dev/null"; then echo -e "${OR} Internet is not reachable - skip update${CL}\n" return fi @@ -739,7 +764,7 @@ OUTPUT_TO_FILE () { CLEAN_LOGFILE () { if [[ "$RICM" != true ]]; then tail -n +2 "$LOG_FILE" > tmp.log && mv tmp.log "$LOG_FILE" - cat $LOG_FILE | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,3})*)?[mGK]//g" | tee "$LOG_FILE" >/dev/null 2>&1 + cat "$LOG_FILE" | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,3})*)?[mGK]//g" | tee "$LOG_FILE" >/dev/null 2>&1 chmod 640 "$LOG_FILE" if [[ -f ./tmp.log ]]; then rm -rf ./tmp.log From b106c80af33d457aeedc2c537570e027df6f9c18 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:06:45 +0200 Subject: [PATCH 54/74] Update welcome-screen.sh --- welcome-screen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/welcome-screen.sh b/welcome-screen.sh index 7c936c8..6093483 100644 --- a/welcome-screen.sh +++ b/welcome-screen.sh @@ -4,10 +4,10 @@ # Welcome-Screen # ################## -VERSION="1.3.2" +VERSION="1.3.3" # Branch -BRANCH="beta" +BRANCH="develop" # Variable / Function CONFIG_FILE="/root/Proxmox-Updater/update.conf" From d817a5838412d6536bb42a0d6923c81501bc638b Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:07:33 +0200 Subject: [PATCH 55/74] Update change.log --- change.log | 3 +++ 1 file changed, 3 insertions(+) diff --git a/change.log b/change.log index b2d23b5..3a19e1a 100644 --- a/change.log +++ b/change.log @@ -1,6 +1,9 @@ Changelog: ========== +**v3.8.7** (develop) +- code cleaning + **v3.8.6** (beta) - check internet connection on each LXC/VM - config file: From f3fa8db79474f687937d749731c74a524100adfb Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:08:39 +0200 Subject: [PATCH 56/74] Update update.conf --- update.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/update.conf b/update.conf index eb3e479..c2c9312 100644 --- a/update.conf +++ b/update.conf @@ -5,7 +5,7 @@ # change 'true' or commend out with '#' # ################################################ -VERSION="1.3" +VERSION="1.3.1" VERSION_CHECK="true" URL_FOR_INTERNET_CHECK="google.com" @@ -23,6 +23,8 @@ RUNNING_CONTAINER="true" INCLUDE_KERNEL="true" INCLUDE_PHASED_UPDATES="false" +BACKUP="true" #enables backup before update + ################################################ # Extra Updates # ################################################ From cabeeb234bdc697118401eeb36e7fb64e6c178e3 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:16:38 +0200 Subject: [PATCH 57/74] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2619b8c..7d59472 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ [![GitHub release](https://img.shields.io/github/release/BassT23/Proxmox.svg)](https://GitHub.com/BassT23/Proxmox/releases/) [![GitHub stars](https://img.shields.io/github/stars/BassT23/Proxmox.svg)](https://github.com/BassT23/Proxmox/stargazers) [![downloads](https://img.shields.io/github/downloads/BassT23/Proxmox/total.svg)](https://github.com/BassT23/Proxmox/releases) +[![Discord](https://dcbadge.vercel.app/api/server/Bv2dnk5F?style=flat)](https://discord.gg/Bv2dnk5F) + Proxmox® is a registered trademark of Proxmox Server Solutions GmbH. @@ -53,6 +55,7 @@ Changelog: [here](https://github.com/BassT23/Proxmox/blob/beta/change.log) ### What does the script do: - The script make system updates with apt/dnf/pacman/apk or yum on all nodes/LXCs and VMs (if VMs prepared for that) +- Before the LXC/VM update start, there will be made a snapshot. This can be disabled in `update.conf` - After that it makes an little cleaning (like `apt autoremove`) - If the script detects "extra" installations, it could update this also. (look in config file, for this) @@ -150,4 +153,4 @@ To go back to master, choose `update -up` [![grafik](https://user-images.githubusercontent.com/30832786/227482640-e7800e89-32a6-44fc-ad3b-43eef5cdc4d4.png)](https://ko-fi.com/basst) # Credits: -[@Uruk](https://github.com/Uruknara) - for help with the code +[@Uruk](https://github.com/Uruknara) / [@elbim](https://github.com/elbim) From 0bbdcf66c080a41fd7a4c0e127194a839c70d145 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:20:39 +0200 Subject: [PATCH 58/74] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d59472..ce0473b 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ [![GitHub release](https://img.shields.io/github/release/BassT23/Proxmox.svg)](https://GitHub.com/BassT23/Proxmox/releases/) [![GitHub stars](https://img.shields.io/github/stars/BassT23/Proxmox.svg)](https://github.com/BassT23/Proxmox/stargazers) [![downloads](https://img.shields.io/github/downloads/BassT23/Proxmox/total.svg)](https://github.com/BassT23/Proxmox/releases) -[![Discord](https://dcbadge.vercel.app/api/server/Bv2dnk5F?style=flat)](https://discord.gg/Bv2dnk5F) +[![Discord](https://dcbadge.vercel.app/api/server/Bv2dnk5F?style=flat)](https://discord.gg/7kgc7fjB) From 49e224977f58ecbf06e6bfb689ace2a46c41ec57 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:54:40 +0200 Subject: [PATCH 59/74] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce0473b..fe17109 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ [![GitHub release](https://img.shields.io/github/release/BassT23/Proxmox.svg)](https://GitHub.com/BassT23/Proxmox/releases/) [![GitHub stars](https://img.shields.io/github/stars/BassT23/Proxmox.svg)](https://github.com/BassT23/Proxmox/stargazers) [![downloads](https://img.shields.io/github/downloads/BassT23/Proxmox/total.svg)](https://github.com/BassT23/Proxmox/releases) -[![Discord](https://dcbadge.vercel.app/api/server/Bv2dnk5F?style=flat)](https://discord.gg/7kgc7fjB) +[![Discord](https://img.shields.io/discord/1149671790864506882)](https://discord.gg/xyfdGbtV) From 50532d50017e49fc63ad2d4b42606d41dcda4f49 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 13 Oct 2023 05:47:38 +0200 Subject: [PATCH 60/74] Update check-updates.sh --- check-updates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-updates.sh b/check-updates.sh index 3503f51..9b87f95 100644 --- a/check-updates.sh +++ b/check-updates.sh @@ -361,7 +361,7 @@ else fi # Run -if [ "$(wget -q --spider http://google.com)" -eq 0 ]; then +if [[ "$(wget -q --spider http://google.com)" -eq 0 ]]; then READ_WRITE_CONFIG ARGUMENTS "$@" else From 068a160b497ea4b7bbb6af639d1e757d424335b4 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 13 Oct 2023 18:31:48 +0200 Subject: [PATCH 61/74] disable backup of container by default if it work faster, I will enable it by default --- update.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.conf b/update.conf index c2c9312..9a7e77f 100644 --- a/update.conf +++ b/update.conf @@ -23,7 +23,7 @@ RUNNING_CONTAINER="true" INCLUDE_KERNEL="true" INCLUDE_PHASED_UPDATES="false" -BACKUP="true" #enables backup before update +BACKUP="false" #enables backup before update ################################################ # Extra Updates # From 708e0076d6e4066c52fc5963467cf867a2ed9e32 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 15 Oct 2023 20:43:19 +0200 Subject: [PATCH 62/74] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fe17109..c383fbf 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,8 @@ Changelog: [here](https://github.com/BassT23/Proxmox/blob/beta/change.log) ### What does the script do: - The script make system updates with apt/dnf/pacman/apk or yum on all nodes/LXCs and VMs (if VMs prepared for that) -- Before the LXC/VM update start, there will be made a snapshot. This can be disabled in `update.conf` -- After that it makes an little cleaning (like `apt autoremove`) +- Before the LXC/VM update start, there will be made a snapshot. This can be ensabled in `update.conf` +- After the update it makes an little cleaning (like `apt autoremove`) - If the script detects "extra" installations, it could update this also. (look in config file, for this) ## From 3f4b684e39d37d913ce1308dbd938a2e11316ab7 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 15 Oct 2023 20:44:51 +0200 Subject: [PATCH 63/74] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c383fbf..4c363cd 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Changelog: [here](https://github.com/BassT23/Proxmox/blob/beta/change.log) ### What does the script do: - The script make system updates with apt/dnf/pacman/apk or yum on all nodes/LXCs and VMs (if VMs prepared for that) -- Before the LXC/VM update start, there will be made a snapshot. This can be ensabled in `update.conf` +- Before the LXC/VM update start, there could be make a backup. This could be enabled in `update.conf` - After the update it makes an little cleaning (like `apt autoremove`) - If the script detects "extra" installations, it could update this also. (look in config file, for this) From cbfb1425879744ad9156ca88538771b70b6110a7 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Sun, 15 Oct 2023 20:48:20 +0200 Subject: [PATCH 64/74] Update change.log --- change.log | 1 + 1 file changed, 1 insertion(+) diff --git a/change.log b/change.log index 3a19e1a..56f16fc 100644 --- a/change.log +++ b/change.log @@ -2,6 +2,7 @@ Changelog: ========== **v3.8.7** (develop) +- make backup before update (must be enabled in config by user) - code cleaning **v3.8.6** (beta) From 900647e96761ae9f2f1534b8372c5d0f51178d4d Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Wed, 18 Oct 2023 12:36:16 +0200 Subject: [PATCH 65/74] New Logo --- README.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4c363cd..a0b9b3f 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,7 @@ -``` - ____ - / __ \_________ _ ______ ___ ____ _ __ - / /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ - / ____/ / / /_/ /> < - /_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| - __ __ __ __ - / / / /___ ____/ /___ _/ /____ ____ - / / / / __ \/ __ / __ `/ __/ _ \/ __/ - / /_/ / /_/ / /_/ / /_/ / /_/ __/ / - \____/ .___/\____/\____/\__/\___/_/ - /_/ -```
+![Logo](https://github.com/BassT23/Proxmox/assets/30832786/00fa746d-3d65-4b01-8906-50ecb845a50d) + ![Screenshot_20230326_130709](https://user-images.githubusercontent.com/30832786/227771669-aae7e7f4-b27e-4095-950a-c6fa1f146503.png) [![GitHub release](https://img.shields.io/github/release/BassT23/Proxmox.svg)](https://GitHub.com/BassT23/Proxmox/releases/) From 8edbdfa60d0386c0042cf9019f8c50c816cbb235 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 20 Oct 2023 20:35:21 +0200 Subject: [PATCH 66/74] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7ed94a3..93924d8 100644 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ VERSION="1.6.7" # Branch -BRANCH="develop" +BRANCH="beta" # Variable / Function LOCAL_FILES="/root/Proxmox-Updater" From 4c14cf9be94147d201d9d8d7f5b72b42cdb9e2fb Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 20 Oct 2023 20:35:43 +0200 Subject: [PATCH 67/74] Update welcome-screen.sh --- welcome-screen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/welcome-screen.sh b/welcome-screen.sh index 6093483..1fd8dff 100644 --- a/welcome-screen.sh +++ b/welcome-screen.sh @@ -7,7 +7,7 @@ VERSION="1.3.3" # Branch -BRANCH="develop" +BRANCH="beta" # Variable / Function CONFIG_FILE="/root/Proxmox-Updater/update.conf" From b493af5b7d4951f3f1aa98652d1088a6a2564676 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Fri, 20 Oct 2023 20:44:02 +0200 Subject: [PATCH 68/74] Update update.conf --- update.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/update.conf b/update.conf index ed84a9a..18e1cad 100644 --- a/update.conf +++ b/update.conf @@ -23,7 +23,13 @@ RUNNING_CONTAINER="true" INCLUDE_KERNEL="true" INCLUDE_PHASED_UPDATES="false" -BACKUP="false" #change "false" to "true" to enable +################################################ +#This would need much more time for the script!# +# Better make Backups at night with the UI # +# change "false" to "true" to enable # +################################################ + +BACKUP="false" ################################################ # Extra Updates # From 85d415983d4fe36d9ac3f24cd5fedf66c140abd1 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Mon, 6 Nov 2023 21:59:01 +0100 Subject: [PATCH 69/74] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 46807a7..3f3934c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![GitHub release](https://img.shields.io/github/release/BassT23/Proxmox.svg)](https://GitHub.com/BassT23/Proxmox/releases/) [![GitHub stars](https://img.shields.io/github/stars/BassT23/Proxmox.svg)](https://github.com/BassT23/Proxmox/stargazers) [![downloads](https://img.shields.io/github/downloads/BassT23/Proxmox/total.svg)](https://github.com/BassT23/Proxmox/releases) -[![Discord](https://img.shields.io/discord/1149671790864506882)](https://discord.gg/xyfdGbtV) +[![Discord](https://img.shields.io/discord/1149671790864506882)](https://discord.gg/nVpUg6BKn8) From c6bf46aae17fb1afd34fbe58f602d0b89b17bfc6 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Mon, 6 Nov 2023 22:04:26 +0100 Subject: [PATCH 70/74] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f3934c..0da883c 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ I am no member of the Proxmox Server Solutions GmbH. This is not an official pro ### Features: - Update Proxmox VE (the host / all cluster nodes / all included LXCs and VMs) - Normal run is "Interactive" / Headless Mode can be run with `update -s` -- Logging +- Logging to ``/var/log/update-"$HOSTNAME".log`` - Exit tracking, so you can send additional commands for finish or failure (edit files in `/root/Proxmox-Updater/exit`) - [Config file](https://github.com/BassT23/Proxmox#config-file) From bac2eda311df7e917d11e5136f6af2f7bf0335a1 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Tue, 7 Nov 2023 05:45:11 +0100 Subject: [PATCH 71/74] Update update.sh --- update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index 5b7e816..3d8dcd2 100644 --- a/update.sh +++ b/update.sh @@ -4,10 +4,10 @@ # Update # ########## -VERSION="3.8.8" +VERSION="3.9" # Branch -BRANCH="beta" +BRANCH="master" # Variable / Function LOG_FILE=/var/log/update-"$HOSTNAME".log # <- change location for logfile if you want From c8652800d9435942eea9a1ab17f5dae992db9353 Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Tue, 7 Nov 2023 05:45:45 +0100 Subject: [PATCH 72/74] Update change.log --- change.log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change.log b/change.log index 3bc2682..dcea56f 100644 --- a/change.log +++ b/change.log @@ -1,7 +1,7 @@ Changelog: ========== -**v3.8.8** (beta) +**v3.9** (07.11.2023) - make backup before update (must be enabled in config by user) - code cleaning - check internet connection on each LXC/VM From 9fcb3fdc5991a382feb7e25c79e2ffd3b14c31fe Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Tue, 7 Nov 2023 05:46:07 +0100 Subject: [PATCH 73/74] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 93924d8..3396464 100644 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ VERSION="1.6.7" # Branch -BRANCH="beta" +BRANCH="master" # Variable / Function LOCAL_FILES="/root/Proxmox-Updater" From 8042723cd22556a3400eced4c3b2d6740e4a85ab Mon Sep 17 00:00:00 2001 From: BassT23 <30832786+BassT23@users.noreply.github.com> Date: Tue, 7 Nov 2023 05:46:25 +0100 Subject: [PATCH 74/74] Update welcome-screen.sh --- welcome-screen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/welcome-screen.sh b/welcome-screen.sh index 1fd8dff..72589a4 100644 --- a/welcome-screen.sh +++ b/welcome-screen.sh @@ -7,7 +7,7 @@ VERSION="1.3.3" # Branch -BRANCH="beta" +BRANCH="master" # Variable / Function CONFIG_FILE="/root/Proxmox-Updater/update.conf"