feat: install priority plugins first

This commit is contained in:
ljm42
2025-01-28 13:19:47 -07:00
parent 07f96d490a
commit 33872603ea
+15 -3
View File
@@ -163,11 +163,23 @@ else
log "Installing /boot/extra packages"
( export -f log; find /boot/extra -maxdepth 1 -type f -exec sh -c 'upgradepkg --terse --install-new "$1" | log' -- "{}" \; )
fi
# Install plugins
log "Installing plugins"
PRIORITY_PLUGINS=("unraid.patch.plg" "dynamix.unraid.net.plg" "dynamix.unraid.net.staging.plg")
# Install priority plugins first
for PRIORITY_PLUGIN in "${PRIORITY_PLUGINS[@]}"; do
PRIORITY_PLUGIN_PATH="$CONFIG/plugins/$PRIORITY_PLUGIN"
if [[ -f "$PRIORITY_PLUGIN_PATH" ]]; then
/usr/local/sbin/plugin install "$PRIORITY_PLUGIN_PATH" | log
fi
done
# Install remaining plugins
shopt -s nullglob
for PLUGIN in $CONFIG/plugins/*.plg; do
/usr/local/sbin/plugin install $PLUGIN | log
PLUGIN_NAME=$(basename "$PLUGIN")
# Skip already installed priority plugins
if [[ " ${PRIORITY_PLUGINS[*]} " == *" $PLUGIN_NAME "* ]]; then
continue
fi
/usr/local/sbin/plugin install "$PLUGIN" | log
done
shopt -u nullglob
fi