Skip to content

Commit ecd72e1

Browse files
authored
Merge pull request #163 from BassT23/beta
v4.2 release
2 parents 6b2448c + 17d90f7 commit ecd72e1

File tree

9 files changed

+136
-94
lines changed

9 files changed

+136
-94
lines changed
File renamed without changes.

.github/workflows/linting.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ jobs:
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18-
1918
- name: (Lint) Run ShellCheck
2019
uses: ludeeus/action-shellcheck@master # v2.0.0

change.log

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog:
22
==========
33

4+
**v4.2** (01.12.2024)
5+
- fix VM Template error
6+
- fix Unifi-Controller Container
7+
- fix FreeBSD VM error
8+
- fix docker compose
9+
- fix node hopping without welcome screen installed
10+
- rebuild waiting for VM start (could now be set in config file)
11+
412
**v4.1** (07.04.2024)
513
- disable/enable Snapshots and Backups in config file
614
- set, how many snapshots will be keep, in config file

check-updates.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#################
66

77
# shellcheck disable=SC2034
8-
VERSION="1.4.8"
8+
VERSION="1.5"
99

1010
#Variable / Function
1111
LOCAL_FILES="/etc/ultimate-updater"

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
###########
66

77
# shellcheck disable=SC2034
8-
VERSION="1.7.1"
8+
VERSION="1.8"
99

1010
# Branch
1111
BRANCH="master"
@@ -34,8 +34,8 @@ HEADER_INFO () {
3434
/ /_/ / / /_/ / / / / / / /_/ / /_/ __/
3535
\____/_/\__/_/_/ /_/ /_/\____/\__/\___/
3636
__ __ __ __
37-
/ / / /___ ____/ /___ _/ /____ _____
38-
/ / / / __ \/ __ / __ `/ __/ _ \/ ___/
37+
/ / / /___ ____/ /___ _/ /____ ____
38+
/ / / / __ \/ __ / __ `/ __/ _ \/ __/
3939
/ /_/ / /_/ / /_/ / /_/ / /_/ __/ /
4040
\____/ ____/\____/\____/\__/\___/_/
4141
/_/ for Proxmox VE

update-extras.sh

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#################
66

77
# shellcheck disable=SC2034
8-
VERSION="1.8.5"
8+
VERSION="1.9"
99

1010
# Variables
1111
CONFIG_FILE="/etc/ultimate-updater/update.conf"
@@ -14,6 +14,7 @@ IOBROKER=$(awk -F'"' '/^IOBROKER=/ {print $2}' $CONFIG_FILE)
1414
PTERODACTYL=$(awk -F'"' '/^PTERODACTYL=/ {print $2}' $CONFIG_FILE)
1515
OCTOPRINT=$(awk -F'"' '/^OCTOPRINT=/ {print $2}' $CONFIG_FILE)
1616
DOCKER_COMPOSE=$(awk -F'"' '/^DOCKER_COMPOSE=/ {print $2}' $CONFIG_FILE)
17+
COMPOSE_PATH=$(awk -F'"' '/^COMPOSE_PATH=/ {print $2}' $CONFIG_FILE)
1718

1819
# PiHole
1920
if [[ -f "/usr/local/bin/pihole" && $PIHOLE == true ]]; then
@@ -83,49 +84,47 @@ fi
8384
if [[ -f /usr/local/bin/docker-compose ]]; then DOCKER_COMPOSE_V1=true; fi
8485
if docker compose version &>/dev/null; then DOCKER_COMPOSE_V2=true; fi
8586

86-
# Docker-Compose v1
87-
if [[ $DOCKER_COMPOSE_V1 == true && $DOCKER_COMPOSE == true ]]; then
88-
echo -e "\n*** Updating Docker-Compose v1 (oldstable) ***\n"
89-
if COMPOSE=$(find / -name "docker-compose.yaml" >/dev/null 2>&1 | rev | cut -c 20- | rev | tail -n 1); then
90-
:
91-
elif COMPOSE=$(find / -name "docker-compose.yml" >/dev/null 2>&1 | rev | cut -c 20- | rev | tail -n 1); then
92-
:
93-
fi
94-
cd "$COMPOSE" || exit
95-
# Get the containers from the first argument, else get all containers
96-
CONTAINER_LIST="${1:-$(docker ps -q)}"
97-
for CONTAINER in ${CONTAINER_LIST}; do
98-
# Get requirements
99-
CONTAINER_IMAGE=$(docker inspect --format "{{.Config.Image}}" --type container "${CONTAINER}")
100-
RUNNING_IMAGE=$(docker inspect --format "{{.Image}}" --type container "${CONTAINER}")
101-
NAME=$(docker inspect --format "{{.Name}}" --type container "${CONTAINER}" | cut -c 2-)
102-
# Pull in the latest version of the container and get the hash
103-
docker pull "${CONTAINER_IMAGE}" 2> /dev/null
104-
LATEST_IMAGE=$(docker inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")
105-
# Restart the container if the image is different by name
106-
if [[ ${RUNNING_IMAGE} != "${LATEST_IMAGE}" ]]; then
107-
echo "Updating ${CONTAINER} image ${CONTAINER_IMAGE}"
108-
/usr/local/bin/docker-compose up -d --no-deps --build "$NAME"
109-
fi
110-
cd "$COMPOSE" || exit
111-
# Docker-Compose v1
112-
if [[ $DOCKER_COMPOSE_V1 == true ]]; then
113-
echo -e "\n*** Updating Docker-Compose v1 (oldstable) ***\n"
114-
/usr/local/bin/docker-compose pull
115-
/usr/local/bin/docker-compose up --force-recreate --build -d
116-
/usr/local/bin/docker-compose restart
117-
fi
118-
# Docker-Compose v2
119-
if [[ $DOCKER_COMPOSE_V2 == true ]]; then
120-
echo -e "\n*** Updating Docker Compose ***"
121-
docker compose pull
122-
docker compose up -d
123-
fi
124-
# Cleaning
87+
# Docker-Compose run
88+
if [[ $DOCKER_COMPOSE == true && $DOCKER_COMPOSE_V1 == true || $DOCKER_COMPOSE_V2 == true ]]; then
89+
# Cleaning
90+
DOCKER_EXIT () {
12591
echo -e "\n*** Cleaning ***"
12692
docker container prune -f
12793
docker system prune -a -f
12894
docker image prune -f
12995
docker system prune --volumes -f
96+
}
97+
COMPOSEFILES=("docker-compose.yaml" "docker-compose.yml" "compose.yaml" "compose.yml")
98+
DIRLIST=()
99+
for COMPOSEFILE in "${COMPOSEFILES[@]}"; do
100+
while IFS= read -r line; do
101+
DIRLIST+=("$line")
102+
done < <(find "$COMPOSE_PATH" -name "$COMPOSEFILE" -exec dirname {} \; 2> >(grep -v 'Permission denied'))
130103
done
131-
fi
104+
# Docker-Compose v1
105+
if [[ $DOCKER_COMPOSE_V1 == true && ${#DIRLIST[@]} -gt 0 ]]; then
106+
echo -e "\n*** Updating Docker-Compose v1 (oldstable) ***\n"
107+
for dir in "${DIRLIST[@]}"; do
108+
echo "Updating $dir..."
109+
pushd "$dir" > /dev/null || return
110+
/usr/local/bin/docker-compose pull
111+
/usr/local/bin/docker-compose up --force-recreate --build -d
112+
/usr/local/bin/docker-compose restart
113+
popd > /dev/null || return
114+
done
115+
echo "All projects have been updated."
116+
DOCKER_EXIT
117+
fi
118+
# Docker-Compose v2
119+
if [[ $DOCKER_COMPOSE_V2 == true && ${#DIRLIST[@]} -gt 0 ]]; then
120+
echo -e "\n*** Updating Docker Compose ***"
121+
for dir in "${DIRLIST[@]}"; do
122+
echo "Updating $dir..."
123+
pushd "$dir" > /dev/null || return
124+
docker compose pull && docker compose up -d
125+
popd > /dev/null || return
126+
done
127+
echo "All projects have been updated."
128+
DOCKER_EXIT
129+
fi
130+
fi

update.conf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
║ The Ultimate Updater ║
33
║ Config File ║
44
╟──────────────────────────────────────────────╢
5-
║ change 'true/false' or commend out with '#' ║
5+
║ change 'true/false' or comment out with '#' ║
66
╚══════════════════════════════════════════════╝
77
┌──────────────────────────────────────────────┐
88
│ General │
99
└──────────────────────────────────────────────┘
1010

11-
VERSION="1.3.3"
11+
VERSION="1.4"
1212
USED_BRANCH="master" # could be "master/beta/develop"
1313

1414
LOG_FILE="/var/log/ultimate-updater.log"
1515
VERSION_CHECK="true"
1616
URL_FOR_INTERNET_CHECK="google.com"
17-
SSH_PORT="22" # work in later release
17+
SSH_PORT="22"
1818

1919

2020
╔══════════════════════════════════════════════╗
@@ -61,6 +61,8 @@ RUNNING_VM="true"
6161
INCLUDE_KERNEL="true"
6262
INCLUDE_PHASED_UPDATES="false"
6363

64+
VM_START_DELAY="45" # secounds
65+
6466
┌──────────────────────────────────────────────┐
6567
│ Only/Exclude LXC and/or VM │
6668
│ Example: ONLY/EXCLUDE="100 110 120" │
@@ -95,3 +97,4 @@ IOBROKER="true"
9597
PTERODACTYL="true"
9698
OCTOPRINT="true"
9799
DOCKER_COMPOSE="true"
100+
COMPOSE_PATH="/home" # Default is /home but it can be changed to (ex: /root, /opt, ...)

0 commit comments

Comments
 (0)