diff --git a/api/ecosystem.config.json b/api/ecosystem.config.json index 6a78d511ac..4bd8635feb 100644 --- a/api/ecosystem.config.json +++ b/api/ecosystem.config.json @@ -11,7 +11,7 @@ "max_restarts": 10, "min_uptime": 10000, "watch": false, - "interpreter": "/usr/local/node/bin/node", + "interpreter": "/usr/local/bin/node", "ignore_watch": ["node_modules", "src", ".env.*", "myservers.cfg"], "log_file": "/var/log/graphql-api.log", "kill_timeout": 10000 diff --git a/api/vite.config.ts b/api/vite.config.ts index 756652cc58..aeb954557f 100644 --- a/api/vite.config.ts +++ b/api/vite.config.ts @@ -92,7 +92,7 @@ export default defineConfig(({ mode }): ViteUserConfig => { interop: 'auto', banner: (chunk) => { if (chunk.fileName === 'main.js' || chunk.fileName === 'cli.js') { - return '#!/usr/local/node/bin/node\n'; + return '#!/usr/local/bin/node\n'; } return ''; }, diff --git a/plugin/plugins/dynamix.unraid.net.plg b/plugin/plugins/dynamix.unraid.net.plg index 1c825ba7df..373da2f34e 100755 --- a/plugin/plugins/dynamix.unraid.net.plg +++ b/plugin/plugins/dynamix.unraid.net.plg @@ -30,6 +30,7 @@ + ]> Network Settings and changing your DNS server to 8.8.8.8" # Note: DNS checks will fail if the network is not available at boot. Cannot exit the install when DNS checks fail. -echo -echo "⚠️ Do not close this window yet" -echo exit 0 ]]> @@ -127,6 +125,7 @@ exit 0 NODE_FILE="&NODEJS_FILENAME;" VENDOR_ARCHIVE="&VENDOR_STORE_FILENAME;" + NODE_DIR="&NODE_DIR;" @@ -231,10 +226,6 @@ version= # shellcheck disable=SC1091 source /etc/unraid-version -echo -echo "⚠️ Do not close this window yet" -echo - if [ -e /etc/rc.d/rc.unraid-api ]; then touch /tmp/restore-files-dynamix-unraid-net # stop flash backup @@ -361,6 +352,7 @@ exit 0 TAG="&TAG;" MAINTXZ="&source;.txz" VENDOR_ARCHIVE="/boot/config/plugins/dynamix.my.servers/&VENDOR_STORE_FILENAME;" PNPM_BINARY_FILE="&PNPM_BINARY;" + NODE_DIR="&NODE_DIR;" /boot/config/plugins/dynamix.my.servers/env @@ -765,10 +751,6 @@ if [[ "$webguiManifestTs" -gt "$plgManifestTs" ]]; then echo "♻️ Reverted to stock web component files" fi -echo -echo "⚠️ Do not close this window yet" -echo - # Activation and partner setup # - Must come after the web component timestamp check to avoid potentially targeting the wrong JS during this setup source /usr/local/emhttp/plugins/dynamix.my.servers/scripts/activation_code_setup @@ -818,9 +800,9 @@ fi # Create symlink to unraid-api binary (to allow usage elsewhere) -ln -sf /usr/local/node/bin/node /usr/local/bin/node -ln -sf /usr/local/node/bin/npm /usr/local/bin/npm -ln -sf /usr/local/node/bin/corepack /usr/local/bin/corepack +ln -sf ${NODE_DIR}/bin/node /usr/local/bin/node +ln -sf ${NODE_DIR}/bin/npm /usr/local/bin/npm +ln -sf ${NODE_DIR}/bin/corepack /usr/local/bin/corepack ln -sf ${unraid_binary_path} /usr/local/sbin/unraid-api ln -sf ${unraid_binary_path} /usr/bin/unraid-api @@ -829,12 +811,8 @@ cp -f "${PNPM_BINARY_FILE}" /usr/local/bin/pnpm chmod +x /usr/local/bin/pnpm /etc/rc.d/rc.unraid-api restore-dependencies "$VENDOR_ARCHIVE" -echo -echo "⚠️ Do not close this window yet" /etc/rc.d/rc.unraid-api pnpm-install echo -echo "⚠️ Do not close this window yet" -echo echo "About to start the Unraid API"