#!/usr/bin/env bash # Copy the Fluxer template into Community Apps' Private folder, and into the # Docker template dropdown. Run this on the Unraid server. set -euo pipefail cd "$(dirname "$0")/.." SRC="unraid/fluxer.xml" PRIVATE_DIR="/boot/config/plugins/community.applications/private/fluxer" PRIVATE="${PRIVATE_DIR}/fluxer.xml" USER_DIR="/boot/config/plugins/dockerMan/templates-user" USER="${USER_DIR}/my-fluxer.xml" if [[ ! -f "$SRC" ]]; then echo "Missing $SRC" >&2 exit 1 fi if [[ ! -d /boot/config/plugins ]]; then echo "Unraid flash config was not found. Run this on the Unraid server." >&2 exit 1 fi first="$(head -n 1 "$SRC")" if [[ "$first" != '' ]]; then echo "Template does not start with an XML declaration." >&2 exit 1 fi mkdir -p "$PRIVATE_DIR" "$USER_DIR" cp "$SRC" "$PRIVATE" cp "$SRC" "$USER" echo "Installed:" echo " $PRIVATE" echo " $USER" echo echo "Next:" echo " 1. Open Apps and refresh the page." echo " 2. Open the Private section and install Fluxer Stack." echo " 3. Set FLUXER_DOMAIN to your hostname, then Apply." echo echo "The Docker page template dropdown also lists my-fluxer after a refresh."