rename appdata folder and repo from unraid_scripts to varaverk

- TARGET_DIR, DATA_DIR: /mnt/user/appdata/unraid_scripts → /mnt/user/appdata/varaverk
- GITEA_REPO_PATH: Varaverk/Unraid_Scripts.git → Varaverk/varaverk.git
- DEV_ROOT: .../Development/Unraid_Scripts → .../Development/varaverk
- deploy hook path updated in .claude/settings.json
- All script comments, docs, and manual paths updated throughout
This commit is contained in:
Gmer4Lfe
2026-05-30 10:07:03 -04:00
parent 788c04ce9d
commit 921900b23b
15 changed files with 560 additions and 348 deletions
+7 -3
View File
@@ -115,7 +115,7 @@
# Array share — survives reboots, no flash drive wear.
# Created automatically if it doesn't exist.
# Only truly critical files (fallback state, watchdog reboot log) stay on /boot/config.
DATA_DIR="/mnt/user/appdata/unraid_scripts/data"
DATA_DIR="/mnt/user/appdata/varaverk/data"
# ── Version Parity ──
# Controls behaviour when local and remote unRAID versions differ.
@@ -248,9 +248,9 @@
# Detects Gitea container location at runtime — works through failover automatically.
# Falls back to GITEA_DOMAIN if local and Tailscale both fail.
GITEA_CONTAINER="Gitea"
GITEA_REPO_PATH="Varaverk/Unraid_Scripts.git"
GITEA_REPO_PATH="Varaverk/varaverk.git"
GITEA_DOMAIN="" # e.g. git.yourdomain.com — requires NPM + DNS
TARGET_DIR="/mnt/user/appdata/unraid_scripts"
TARGET_DIR="/mnt/user/appdata/varaverk"
GITEA_SSH_KEY="/root/.ssh/unraid_gitea"
SSH_PORT=221 # Gitea SSH port (default 22, Gitea often uses 221/222)
GITEA_HTTP_PORT=3000 # Gitea web/API port — used by gitea_ssh_setup.sh
@@ -636,6 +636,10 @@
FALLBACK_STATE_FILE="/boot/config/fallback_state.db"
FALLBACK_ENABLED=true # HOST2 back online
# false = suppresses "not running" warnings in status scripts
FALLBACK_PARTNERSHIP_REQUIRED=true # gate fallback on an active partnership
# false = standalone mode, no partnership dependency
FALLBACK_PARTNERSHIP_SUSPEND_AFTER=120 # minutes without active partnership before suspending
# 0 = suspend immediately when partnership goes inactive
# ━━━ Failover Test ━━━
# Controlled simulation of a failover event — run manually via fallback_test.sh.
+80
View File
@@ -0,0 +1,80 @@
#!/bin/bash
# ==============================================================================================
# deploy.sh — Sync dev working tree → prod runtime for Plugin PHP and conf files.
# ==============================================================================================
#
# Direct call (interactive): ! bash Deployment/deploy.sh
# Deploys both Plugin and Configurations with full output.
#
# Hook call (Claude Code PostToolUse):
# Reads the tool JSON from stdin, deploys only the component that was actually changed.
# Plugin/ → rsync --delete into prod Plugin/unraid/
# Configurations/ → conf_upgrade.sh (adds new keys, preserves prod values)
#
# ==============================================================================================
DEV_ROOT="/mnt/cloud-storage/Important Shit/Git/Development/varaverk"
PROD_ROOT="/mnt/user/appdata/varaverk"
UPGRADE="$PROD_ROOT/Deployment/conf_upgrade.sh"
LOG="/tmp/vv_deploy.log"
# ── Deploy functions ──────────────────────────────────────────────────────────
deploy_plugin() {
rsync -a --delete --exclude='.git' \
"$DEV_ROOT/Plugin/unraid/" \
"$PROD_ROOT/Plugin/unraid/"
}
deploy_conf() {
for conf in master.conf host1.conf host2.conf; do
tmpl="$DEV_ROOT/Configurations/$conf"
target="$PROD_ROOT/Configurations/$conf"
[[ -f "$tmpl" && -f "$target" ]] && \
"$UPGRADE" --template "$tmpl" --target "$target"
done
}
# ── Entry point ───────────────────────────────────────────────────────────────
# Read stdin (non-blocking — empty when called directly or via '!')
STDIN=$(cat 2>/dev/null || true)
# Extract file_path from hook JSON if present
FILE=$(python3 -c "
import json, sys
try:
d = json.loads(sys.stdin.read())
print(d.get('tool_input', {}).get('file_path', ''))
except:
print('')
" <<< "$STDIN" 2>/dev/null || echo "")
if [[ -z "$FILE" ]]; then
# Direct call (interactive or via !) — deploy everything with output
echo "=== deploy: dev → prod ==="
echo ""
echo "── Plugin ──"
deploy_plugin && echo " rsync done"
echo ""
echo "── Configurations ──"
deploy_conf
echo ""
echo "=== done ==="
exit 0
fi
# Hook call — deploy only the affected component, log silently
{
echo "[$(date '+%H:%M:%S')] hook: $FILE"
if [[ "$FILE" == "$DEV_ROOT/Plugin/"* ]]; then
deploy_plugin && echo " plugin synced"
fi
if [[ "$FILE" == "$DEV_ROOT/Configurations/"* ]]; then
deploy_conf && echo " conf upgraded"
fi
} >> "$LOG" 2>&1
exit 0