fix: update PHP path in plugin and enhance deployment script for web components

- Changed the PHP executable path in the plugin from `/bin/php` to `/usr/bin/php` for better compatibility.
- Improved the `deploy-dev.sh` script by ensuring proper quoting in the rsync command and adding a check to create the remote directory for standalone apps, enhancing deployment reliability.
This commit is contained in:
Eli Bosley
2025-08-31 09:10:41 -04:00
parent 2594df7e9c
commit 771dcef4f7
2 changed files with 8 additions and 9 deletions

View File

@@ -166,7 +166,7 @@ exit 0
</INLINE>
</FILE>
<FILE Run="/bin/php" Method="install">
<FILE Run="/usr/bin/php" Method="install">
<INLINE>
<![CDATA[
<?php

View File

@@ -38,19 +38,18 @@ exit_code=0
# Deploy web components if they exist
if [ "$has_webcomponents" = true ]; then
echo "Deploying web components..."
ssh "root@${server_name}" "rm -rf /usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/nuxt/*"
rsync_command="rsync -avz -e ssh $webcomponents_directory root@${server_name}:/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/nuxt"
echo "$rsync_command"
eval "$rsync_command"
# Run rsync with proper quoting and --delete for safe mirroring
rsync -avz --delete -e "ssh" "$webcomponents_directory" "root@${server_name}:/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/nuxt/"
exit_code=$?
fi
# Deploy standalone apps if they exist
if [ "$has_standalone" = true ]; then
echo "Deploying standalone apps..."
rsync_standalone="rsync -avz --delete -e ssh $standalone_directory root@${server_name}:/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/standalone/"
echo "$rsync_standalone"
eval "$rsync_standalone"
# Ensure remote directory exists
ssh root@"${server_name}" "mkdir -p /usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/standalone/"
# Run rsync with proper quoting
rsync -avz --delete -e "ssh" "$standalone_directory" "root@${server_name}:/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/standalone/"
standalone_exit_code=$?
# If standalone rsync failed, update exit_code
if [ $standalone_exit_code -ne 0 ]; then
@@ -91,7 +90,7 @@ update_auth_request() {
print $0
next
}
!in_array || !/\/plugins\/dynamix\.my\.servers\/unraid-components\/nuxt\/_nuxt\/unraid-components\.client-/ {
!in_array || !/\/plugins\/dynamix\.my\.servers\/unraid-components\/(nuxt\/_nuxt|standalone)\/.*\.m?js/ {
print $0
}
' "$AUTH_REQUEST_FILE" > "${AUTH_REQUEST_FILE}.tmp"