Complete URBM product rename

This commit is contained in:
Mikei386
2026-06-14 23:12:39 +02:00
parent 145e04153e
commit 4e9b6a10f3
35 changed files with 253 additions and 181 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
set -euo pipefail
ROOT=$(mktemp -d)
trap 'rm -rf "$ROOT"' EXIT
OLD_NAME="back""upper"
OLD="$ROOT/boot/config/plugins/$OLD_NAME"
NEW="$ROOT/boot/config/plugins/urbm"
mkdir -p "$OLD/secrets" "$ROOT/var/log/plugins" "$ROOT/tmp/plugins"
printf '%s\n' '{"settings":{"resticPath":"/usr/local/libexec/'"$OLD_NAME"'/restic","restoreRoot":"/mnt/user/'"$OLD_NAME"'-restores","persistentLogDir":"/mnt/user/system/'"$OLD_NAME"'-logs"}}' > "$OLD/config.json"
printf '%s\n' '[]' > "$OLD/runs.json"
printf '%s\n' 'encrypted' > "$OLD/secrets/secret.json"
touch "$ROOT/boot/config/plugins/$OLD_NAME.plg" "$ROOT/var/log/plugins/$OLD_NAME.plg" "$ROOT/tmp/plugins/$OLD_NAME.plg"
URBM_ROOT_PREFIX="$ROOT" "$(dirname "$0")/../plugin/doinst.sh"
test -f "$NEW/config.json"
test -f "$NEW/runs.json"
test -f "$NEW/secrets/secret.json"
test ! -e "$OLD"
test ! -e "$ROOT/boot/config/plugins/$OLD_NAME.plg"
grep -q '/usr/local/libexec/urbm/restic' "$NEW/config.json"
grep -q '/mnt/user/urbm-restores' "$NEW/config.json"
grep -q '/mnt/user/system/urbm-logs' "$NEW/config.json"