Files
Fluxer-selfhost-unraid/plugin/scripts/common.sh
T
Michael Sloan a19983df7b Add an Unraid plugin with a Settings page for Fluxer.
The stack can be installed from a plugin URL and started from Settings, the same shape as other Unraid plugin installers.
2026-11-23 22:03:04 -05:00

27 lines
679 B
Bash

#!/usr/bin/env bash
# Shared paths for the Fluxer Unraid plugin. Source this file. Do not execute it.
CFG=/boot/config/plugins/fluxer/fluxer.cfg
PLUGIN_ROOT=/usr/local/emhttp/plugins/fluxer
LOG=/var/log/fluxer-plugin.log
LOCK=/var/run/fluxer-plugin.lock
fluxer_load_cfg() {
DOMAIN=""
MODE="proxy"
APPDATA="/mnt/user/appdata/fluxer"
STACK="/mnt/user/appdata/fluxer/stack"
if [[ -f "$CFG" ]]; then
# shellcheck disable=SC1090
source "$CFG"
fi
}
fluxer_valid_domain() {
[[ "$1" =~ ^[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?$ ]]
}
fluxer_valid_path() {
local path="$1"
[[ "$path" == /mnt/* && "$path" != /boot && "$path" != /boot/* && "$path" != *..* ]]
}