#!/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" != *..* ]] }