feat: add upgrade and migration flow for native fnOS

This commit is contained in:
2026-10-02 15:49:19 +08:00
parent 57ea2b29f4
commit 27bc5d0353
8 changed files with 214 additions and 9 deletions
+6
View File
@@ -1,6 +1,9 @@
#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source "$SCRIPT_DIR/migrate_legacy.sh"
if [ -f "$TRIM_PKGVAR/havline.db" ] && [ ! -r "$TRIM_PKGVAR/havline.db" ]; then
echo "数据库不可读:$TRIM_PKGVAR/havline.db" > "$TRIM_TEMP_LOGFILE"
exit 1
@@ -11,4 +14,7 @@ if [ -f "$TRIM_PKGVAR/session_secret" ] && [ ! -r "$TRIM_PKGVAR/session_secret"
exit 1
fi
migrate_legacy_data
backup_database
exit 0