Fix plugin routing, missing includes, and make SCRIPTS_DIR configurable

- Rename varaverk.page → Varaverk.page: unRAID nginx only routes URLs
  starting with a capital letter (~^/[A-Z].*), lowercase caused 404
- Add require_once config.php to include/scheduler.php and include/docs.php:
  both used SCRIPTS_DIR constant without including the file that defines it
- Replace hardcoded SCRIPTS_DIR with cfg-file-backed setting: reads from
  /boot/config/plugins/varaverk/varaverk.cfg, falls back to default on first run
- Add Plugin Settings card to Config tab with scripts path field
- Add api/settings.php to write the cfg file (validates directory exists)
This commit is contained in:
Gmer4Lfe
2026-05-23 16:48:52 -04:00
parent 4ab3ddbc47
commit 7b7a3a9e9e
6 changed files with 63 additions and 1 deletions
@@ -2,6 +2,8 @@
// Scheduler — manages schedule.json and /etc/cron.d/varaverk.
// schedule.json is per-host, never synced.
require_once __DIR__ . '/config.php';
define('SCHEDULE_FILE', '/boot/config/plugins/varaverk/schedule.json');
define('CRON_FILE', '/etc/cron.d/varaverk');
define('CRON_USER', 'root');