Point the WebGUI symlink at the actual install, and report this host's identity rather than HOST1's
The .plg hardcoded the flash path and runs every boot, so an appdata node served a stale copy that never receives pulls — fixes appeared to do nothing, indefinitely.
This commit is contained in:
+16
-1
@@ -52,7 +52,22 @@
|
||||
<![CDATA[
|
||||
#!/bin/bash
|
||||
WEB_DIR="/usr/local/emhttp/plugins/varaverk"
|
||||
SRC="/boot/config/plugins/varaverk/Plugin/unraid"
|
||||
|
||||
# SRC follows the install, it is not assumed. This was hardcoded to the flash path while this
|
||||
# block runs on EVERY boot, so an appdata-mode node had its WebGUI pointed back at the flash copy
|
||||
# every time it started — a copy that stops receiving pulls the moment SCRIPTS_DIR moves. The
|
||||
# result is a host where git pull reports success, the files on disk are current, and the pages
|
||||
# served are whatever the flash copy last had. Fixes appear to do nothing, indefinitely.
|
||||
#
|
||||
# varaverk.cfg stays on flash regardless of layout, which is what makes it readable this early.
|
||||
SRC=""
|
||||
if [[ -f /boot/config/plugins/varaverk/varaverk.cfg ]]; then
|
||||
_sd=$( . /boot/config/plugins/varaverk/varaverk.cfg >/dev/null 2>&1 || true
|
||||
printf '%s' "${SCRIPTS_DIR:-}" )
|
||||
[[ -n "$_sd" && -d "$_sd/Plugin/unraid" ]] && SRC="$_sd/Plugin/unraid"
|
||||
fi
|
||||
[[ -z "$SRC" ]] && SRC="/boot/config/plugins/varaverk/Plugin/unraid"
|
||||
|
||||
[[ -L "$WEB_DIR" ]] && rm -f "$WEB_DIR"
|
||||
[[ -d "$WEB_DIR" ]] && rm -rf "$WEB_DIR"
|
||||
ln -sf "$SRC" "$WEB_DIR"
|
||||
|
||||
Reference in New Issue
Block a user