From 96e1fb2a4eb56a79c078e4db7a575c06673472f8 Mon Sep 17 00:00:00 2001 From: adminsopel Date: Fri, 1 May 2026 10:05:55 +0200 Subject: [PATCH] Fix Albumik frontend assets and YunoHost upgrade scripts --- manifest.toml | 2 +- scripts/backup | 3 ++- scripts/install | 3 ++- scripts/remove | 3 ++- scripts/restore | 3 ++- scripts/upgrade | 7 ++++++- web/index.html | 4 ++-- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/manifest.toml b/manifest.toml index 5666759..a396646 100644 --- a/manifest.toml +++ b/manifest.toml @@ -4,7 +4,7 @@ name = "Albumik" logo = "assets/albumik-logo.png" description.en = "Lightweight private photo album with folder permissions and guest uploads" description.pl = "Lekki prywatny album zdjęć z katalogami, gośćmi i akceptacją zdjęć" -version = "0.1.1~ynh1" +version = "0.1.2~ynh1" maintainers = ["Filip"] [upstream] diff --git a/scripts/backup b/scripts/backup index e21b91a..78fa71e 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,6 +1,7 @@ #!/bin/bash set -euo pipefail -source ./_common.sh +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +source "$SCRIPT_DIR/_common.sh" mkdir -p "$YNH_BACKUP_DIR" tar -C / -czf "$YNH_BACKUP_DIR/albumik-data.tar.gz" "${data_dir#/}" "${config_dir#/}" "${install_dir#/}" 2>/dev/null || true diff --git a/scripts/install b/scripts/install index 3f36b67..552a9b4 100755 --- a/scripts/install +++ b/scripts/install @@ -1,6 +1,7 @@ #!/bin/bash set -euo pipefail -source ./_common.sh +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +source "$SCRIPT_DIR/_common.sh" # YunoHost install args # packaging v2 passes these variables to scripts. diff --git a/scripts/remove b/scripts/remove index 695509b..d2ccce4 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,6 +1,7 @@ #!/bin/bash set -euo pipefail -source ./_common.sh +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +source "$SCRIPT_DIR/_common.sh" domain=$(yunohost app setting "$app" domain 2>/dev/null || echo "") diff --git a/scripts/restore b/scripts/restore index ca9f57f..c686411 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,6 +1,7 @@ #!/bin/bash set -euo pipefail -source ./_common.sh +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +source "$SCRIPT_DIR/_common.sh" if [ -f "$YNH_BACKUP_DIR/albumik-data.tar.gz" ]; then tar -C / -xzf "$YNH_BACKUP_DIR/albumik-data.tar.gz" diff --git a/scripts/upgrade b/scripts/upgrade index a811169..b489783 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,11 +1,14 @@ #!/bin/bash set -euo pipefail -source ./_common.sh +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +source "$SCRIPT_DIR/_common.sh" app="${YNH_APP_INSTANCE_NAME:-albumik}" mkdir -p "$install_dir" +rm -rf "$install_dir/backend" "$install_dir/web" "$install_dir/doc" + cp -a "$YNH_APP_BASEDIR/backend" "$YNH_APP_BASEDIR/web" "$YNH_APP_BASEDIR/doc" "$install_dir"/ chown -R "$app:$app" "$install_dir" @@ -15,3 +18,5 @@ systemctl restart "$app" nginx -t systemctl reload nginx + +echo "Albumik upgraded" diff --git a/web/index.html b/web/index.html index ccb419e..81926f7 100644 --- a/web/index.html +++ b/web/index.html @@ -4,7 +4,7 @@ Albumik - + - +