HEX
Server: LiteSpeed
System: Linux cluster02.load-balancer.x2.network 4.18.0-553.51.1.lve.1.el8.x86_64 #1 SMP Wed May 14 14:34:57 UTC 2025 x86_64
User: kbdhpghp (1098)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/kbdhpghp/www/aqualander/wp-content/plugins/fluid-checkout/env.local.sh
#!/bin/bash

# Load the configuration file (which contains the LOCALWP_SCRIPT_PATH)
source "./env.local.config.sh"

# Check if the LocalWP script exists
if [ -f "$LOCALWP_SCRIPT_PATH" ]; then
    # Output a message to indicate the script is being processed
    echo "Processing $LOCALWP_SCRIPT_PATH..."

    # Remove the last 5 lines from the script and store it in a variable
    MODIFIED_SCRIPT=$( sed '$d' "$LOCALWP_SCRIPT_PATH" | sed '$d' | sed '$d' | sed '$d' | sed '$d' )

    # Optionally, save the modified script to a temp file (if needed for debugging)
    rm /tmp/modified-local-env.sh
    echo "$MODIFIED_SCRIPT" > /tmp/modified-local-env.sh

    # Execute the modified script
    source "/tmp/modified-local-env.sh"

    echo "LocalWP environment loaded with the last 5 lines removed."
else
    echo "Error: LocalWP environment script not found at $LOCALWP_SCRIPT_PATH."
fi