Properly detect previous version

This commit is contained in:
Michiel Hazelhof 2025-08-12 15:45:54 +02:00
parent b75dfb2512
commit 874ff182c6
No known key found for this signature in database
GPG Key ID: EECB9B96355B5EBF
2 changed files with 12 additions and 6 deletions

View File

@ -55,9 +55,12 @@ if ($args[0] -eq 'y') {
}
# stop and remove previous existing patch(ed) container
docker stop bitwarden-patch
docker rm bitwarden-patch
docker image rm bitwarden-patch
$oldinstances = docker container ps --all -f Name=bitwarden-patch --format '{{.ID}}'
foreach ($instance in $oldinstances) {
docker stop $instance
docker rm $instance
docker image rm $instance
}
# start a new bitwarden instance so we can patch it
$patchinstance = docker run -d --name bitwarden-patch ghcr.io/bitwarden/self-host:beta

View File

@ -58,9 +58,12 @@ else
fi
# stop and remove previous existing patch(ed) container
docker stop bitwarden-patch
docker rm bitwarden-patch
docker image rm bitwarden-patch
OLDINSTANCES=$(docker container ps --all -f Name=bitwarden-patch --format '{{.ID}}')
for INSTANCE in ${OLDINSTANCES[@]}; do
docker stop $INSTANCE
docker rm $INSTANCE
docker image rm $INSTANCE
done
# start a new bitwarden instance so we can patch it
PATCHINSTANCE=$(docker run -d --name bitwarden-patch ghcr.io/bitwarden/self-host:beta)