Plugin lives in Plugin/ — invisible to User Script Plugin. dev_install.sh symlinks into /usr/local/emhttp/plugins/varaverk/ for development. Pages: Monitor (5s poll), Scheduler (orchs + Advanced children, toggle + cron), Config (raw editor, host-aware file access), Docs (markdown + live $VAR substitution). API endpoints: monitor.php (JSON), scheduler.php (writes schedule.json + cron.d), config.php (writes conf files with host permission check). Includes: config.php (parser, host detection, var map), scheduler.php (job tree, cron.d rebuild), monitor.php (docker, GPU, resources, fallback, transcode), docs.php (file tree, var substitution, Parsedown renderer).
31 lines
943 B
Bash
Executable File
31 lines
943 B
Bash
Executable File
#!/bin/bash
|
|
# dev_install.sh — symlinks plugin files into unRAID WebUI for local development.
|
|
# Run once after cloning. Re-run if the plugin directory is moved.
|
|
# Safe to re-run: removes stale symlink before recreating.
|
|
|
|
set -euo pipefail
|
|
|
|
PLUGIN_NAME="varaverk"
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
SOURCE="$SCRIPT_DIR/usr/local/emhttp/plugins/$PLUGIN_NAME"
|
|
TARGET="/usr/local/emhttp/plugins/$PLUGIN_NAME"
|
|
|
|
if [ ! -d "$SOURCE" ]; then
|
|
echo "ERROR: Source not found: $SOURCE"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -L "$TARGET" ]; then
|
|
echo "Removing existing symlink: $TARGET"
|
|
rm "$TARGET"
|
|
elif [ -d "$TARGET" ]; then
|
|
echo "ERROR: $TARGET exists as a real directory — remove it manually first."
|
|
exit 1
|
|
fi
|
|
|
|
ln -s "$SOURCE" "$TARGET"
|
|
echo "Linked: $TARGET -> $SOURCE"
|
|
echo ""
|
|
echo "Plugin available in unRAID WebUI under Utilities → Varaverk."
|
|
echo "Changes in $SOURCE take effect immediately (no restart needed)."
|