From 00367ad589302ae881e4f0d24d303c5b13e37af3 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Wed, 9 Apr 2025 10:00:10 -0400 Subject: [PATCH 1/5] chore: move node to /usr/libexec --- api/ecosystem.config.json | 2 +- api/vite.config.ts | 2 +- plugin/plugins/dynamix.unraid.net.plg | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/ecosystem.config.json b/api/ecosystem.config.json index 6a78d511ac..0510a986c2 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/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..08c2144298 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/bin/node\n'; } return ''; }, diff --git a/plugin/plugins/dynamix.unraid.net.plg b/plugin/plugins/dynamix.unraid.net.plg index 1c825ba7df..1d4fbe1632 100755 --- a/plugin/plugins/dynamix.unraid.net.plg +++ b/plugin/plugins/dynamix.unraid.net.plg @@ -30,6 +30,7 @@ + ]> NODE_FILE="&NODEJS_FILENAME;" VENDOR_ARCHIVE="&VENDOR_STORE_FILENAME;" + NODE_DIR="&NODE_DIR;" Date: Wed, 9 Apr 2025 10:13:26 -0400 Subject: [PATCH 2/5] chore: fix node path in vite config --- api/vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/vite.config.ts b/api/vite.config.ts index 08c2144298..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/bin/node\n'; + return '#!/usr/local/bin/node\n'; } return ''; }, From c38b374972d95bc96dde544b1c3118e346b22737 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Wed, 9 Apr 2025 10:14:49 -0400 Subject: [PATCH 3/5] chore: remove legacy node location on update --- plugin/plugins/dynamix.unraid.net.plg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/plugins/dynamix.unraid.net.plg b/plugin/plugins/dynamix.unraid.net.plg index 1d4fbe1632..d8c208c593 100755 --- a/plugin/plugins/dynamix.unraid.net.plg +++ b/plugin/plugins/dynamix.unraid.net.plg @@ -158,6 +158,9 @@ exit 0 # Remove stale pnpm store archives from the boot drive find /boot/config/plugins/dynamix.my.servers/ -name "pnpm-store-for-v*.txz" ! -name "${VENDOR_ARCHIVE}" -delete + # Remove the legacy node directory + rm -rf /usr/local/node + echo "Node.js installation successful" exit 0 From 65089eebfce1d8e0c90469b40304cd32b5cac2c4 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Wed, 9 Apr 2025 10:16:03 -0400 Subject: [PATCH 4/5] chore: remove do not close this window yet entries --- plugin/plugins/dynamix.unraid.net.plg | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/plugin/plugins/dynamix.unraid.net.plg b/plugin/plugins/dynamix.unraid.net.plg index d8c208c593..373da2f34e 100755 --- a/plugin/plugins/dynamix.unraid.net.plg +++ b/plugin/plugins/dynamix.unraid.net.plg @@ -106,9 +106,6 @@ dnscheck "mothership.unraid.net" [[ "${DNSERR}" == "yes" && "${DNS_SERVER1}" != "8.8.8.8" ]] && echo " Recommend navigating to Settings -> 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 ]]> @@ -188,10 +185,6 @@ source /usr/local/emhttp/plugins/dynamix.my.servers/scripts/activation_code_remo echo "Performing cleanup operations..." /usr/bin/php /usr/local/emhttp/plugins/dynamix.my.servers/scripts/cleanup_operations.php -echo -echo "⚠️ Do not close this window yet" -echo - exit 0 ]]> @@ -233,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 @@ -396,9 +385,6 @@ EOF exit 0 fi -echo -echo "⚠️ Do not close this window yet" -echo # NOTE: any 'exit 1' after this point will result in a broken install @@ -680,9 +666,6 @@ if [[ -n "$TAG" && "$TAG" != "" ]]; then sed -i "${sedcmd}" "/usr/local/emhttp/plugins/dynamix.unraid.net/README.md" fi -echo -echo "⚠️ Do not close this window yet" -echo # setup env echo "env=\"production\"">/boot/config/plugins/dynamix.my.servers/env @@ -768,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 @@ -832,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" From 50374c47e6a5efac7ac4aa7613a37c65435a9a36 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Wed, 9 Apr 2025 10:28:01 -0400 Subject: [PATCH 5/5] chore: fix pm2 path --- api/ecosystem.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/ecosystem.config.json b/api/ecosystem.config.json index 0510a986c2..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/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