diff --git a/scripts/_common.sh b/scripts/_common.sh index ee6bfce..1c6f41c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,21 +4,26 @@ # COMMON VARIABLES #================================================= -pkg_image="vaultwarden/server" - #================================================= # PERSONAL HELPERS #================================================= _download_vaultwarden_from_docker() { + docker_image="vaultwarden/server" + debian=$(lsb_release --codename --short) + if [[ $debian = "bullseye" ]]; then + docker_version="$(ynh_app_upstream_version)" + elif [[ $debian = "bookworm" ]]; then + docker_version="$(ynh_app_upstream_version)-alpine" + fi - # Download, check integrity, uncompress the source of vaultwarden from app.src to his build directory docker_arg="" # Fixup for armhf if [ "$YNH_ARCH" == "armhf" ]; then docker_arg="--os_arch_variant=linux/arm/v7" fi - ynh_docker_image_extract --dest_dir="$install_dir/build/" --image_spec="$pkg_image:$(ynh_app_upstream_version)" $docker_arg + + ynh_docker_image_extract --dest_dir="$install_dir/build/" --image_spec="$docker_image:$docker_version" $docker_arg # Move files from the extract to the live directory ynh_secure_remove --file="$install_dir/live/"