diff --git a/plugin/plugins/dynamix.unraid.net.plg b/plugin/plugins/dynamix.unraid.net.plg index 208a74b22..cae025d48 100755 --- a/plugin/plugins/dynamix.unraid.net.plg +++ b/plugin/plugins/dynamix.unraid.net.plg @@ -331,8 +331,7 @@ exit 0 > "$LOGFILE" - # Capture output and add to log file - setup_output=$("$SCRIPTS_DIR/setup_api.sh") - echo "$setup_output" >> "$LOGFILE" + echo "Running setup_api.sh" + # Run and show output to user + "$SCRIPTS_DIR/setup_api.sh" else - echo "ERROR: setup_api.sh not found or not executable" >> "$LOGFILE" + echo "ERROR: setup_api.sh not found or not executable" + echo "ERROR: setup_api.sh not found or not executable" fi # Run post-installation verification if [ -x "$SCRIPTS_DIR/verify_install.sh" ]; then echo "Running post-installation verification..." - echo "Running verify_install.sh" >> "$LOGFILE" - # Capture output and add to log file - verify_output=$("$SCRIPTS_DIR/verify_install.sh") - echo "$verify_output" >> "$LOGFILE" + echo "Running verify_install.sh" + # Run and show output to user + "$SCRIPTS_DIR/verify_install.sh" else - echo "ERROR: verify_install.sh not found or not executable" >> "$LOGFILE" + echo "ERROR: verify_install.sh not found or not executable" + echo "ERROR: verify_install.sh not found or not executable" fi -echo "Installation completed at $(date)" >> "$LOGFILE" +echo "Installation completed at $(date)" ]]> @@ -379,6 +378,18 @@ echo "Installation completed at $(date)" >> "$LOGFILE" /etc/rc.d/rc.unraid-api cleanup-dependencies echo "Starting Unraid API service" +echo "DEBUG: Checking PATH: $PATH" +echo "DEBUG: Checking if unraid-api files exist:" +ls -la /usr/local/unraid-api/dist/ +echo "DEBUG: Checking symlink:" +ls -la /usr/local/bin/unraid-api +echo "DEBUG: Checking Node.js version:" +node --version +echo "DEBUG: Checking if cli.js is executable:" +ls -la /usr/local/unraid-api/dist/cli.js +echo "DEBUG: Attempting to run unraid-api directly:" +/usr/local/unraid-api/dist/cli.js version || echo "Direct execution failed" + echo "If no additional messages appear within 30 seconds, it is safe to refresh the page." /etc/rc.d/rc.unraid-api plugins add unraid-api-plugin-connect -b --no-restart /etc/rc.d/rc.unraid-api start diff --git a/plugin/source/dynamix.unraid.net/usr/local/share/dynamix.unraid.net/install/scripts/verify_install.sh b/plugin/source/dynamix.unraid.net/usr/local/share/dynamix.unraid.net/install/scripts/verify_install.sh index de578df03..c510c7adc 100755 --- a/plugin/source/dynamix.unraid.net/usr/local/share/dynamix.unraid.net/install/scripts/verify_install.sh +++ b/plugin/source/dynamix.unraid.net/usr/local/share/dynamix.unraid.net/install/scripts/verify_install.sh @@ -1,10 +1,7 @@ -#!/bin/sh +#!/bin/bash # Unraid API Installation Verification Script # Checks that critical files are installed correctly -# Exit on errors -set -e - echo "Performing comprehensive installation verification..." # Define critical files to check (POSIX-compliant, no arrays) @@ -171,7 +168,7 @@ if [ $TOTAL_ERRORS -eq 0 ]; then else printf 'Found %d total errors.\n' "$TOTAL_ERRORS" echo "Installation verification completed with issues." - echo "See log file for details: /var/log/unraid-api/dynamix-unraid-install.log" + echo "Please review the errors above and contact support if needed." # We don't exit with error as this is just a verification script exit 0 fi \ No newline at end of file