Consolidate all paths to plugin flash dir, fix watchdog 7.3 triggers

- Move SCRIPTS_DIR/DATA_DIR/STATE_DIR from appdata to /boot/config/plugins/varaverk
- All state files now in STATE_DIR (no more /tmp or /boot/config root writes)
- Bootstrap: Gitea-first clone with GitHub fallback, no array dependency
- varaverk.cfg seeded with Gitea connection settings
- .gitignore: add State_Files/, varaverk.cfg, varaverk-*.txz
- Partnership/transcode/fallback scripts use STATE_DIR variables
- PHP config.php: DATA_DIR/STATE_DIR constants, VV_SETUP_STATE_FILE dynamic
- deploy.sh PROD_ROOT updated to plugin flash dir

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gmer4Lfe
2026-05-31 13:30:20 -04:00
co-authored by Claude Sonnet 4.6
parent 9191a54637
commit fb0530deba
40 changed files with 1609 additions and 262 deletions
+1 -1
View File
@@ -327,7 +327,7 @@ fi
# ━━━ Initialise State File ━━━
# ==============================================================================================
if [[ "$DRY_RUN" == false ]]; then
STATE_FILE="/tmp/transcode_state.db"
STATE_FILE="${TRANSCODE_STATE_FILE:-${STATE_DIR:-/tmp}/transcode_state.db}"
NOW=$(date +%s)
cat > "$STATE_FILE" <<EOF
current_target=$RAMDISK_PATH
+1 -1
View File
@@ -102,7 +102,7 @@ source "$SCRIPT_DIR/../load_config.sh"
parse_args "$@"
STATE_FILE="/tmp/transcode_state.db"
STATE_FILE="${TRANSCODE_STATE_FILE:-${STATE_DIR:-/tmp}/transcode_state.db}"
# ==============================================================================================
# ━━━ Setup ━━━
+3 -3
View File
@@ -140,7 +140,7 @@ done
parse_args "${FILTERED_ARGS[@]}"
DOCKER_TIMEOUT=15
STATE_FILE="/tmp/transcode_state.db"
STATE_FILE="${TRANSCODE_STATE_FILE:-${STATE_DIR:-/tmp}/transcode_state.db}"
# ==============================================================================================
# ━━━ Setup ━━━
@@ -250,7 +250,7 @@ get_ssd_free_gb() {
}
get_flip_count() {
local state_file="/tmp/transcode_flip_state.db"
local state_file="${STATE_DIR:-/tmp}/transcode_flip_state.db"
local current_hour
current_hour=$(date '+%Y-%m-%d-%H')
[[ ! -f "$state_file" ]] && echo "0" && return
@@ -261,7 +261,7 @@ get_flip_count() {
}
increment_flip_count() {
local state_file="/tmp/transcode_flip_state.db"
local state_file="${STATE_DIR:-/tmp}/transcode_flip_state.db"
local current_hour
current_hour=$(date '+%Y-%m-%d-%H')
local current_count