#\!/bin/bash # Simple direct fix for Zoho CRM integration # This script deploys the necessary changes to the staging server # Colors for output GREEN='\033[0;32m' RED='\033[0;31m' YELLOW='\033[1;33m' NC='\033[0m' # No Color # Load environment variables source "$(dirname "$0")/../.env" # Check if environment variables are loaded if [ -z "$UPSKILL_STAGING_IP" ] || [ -z "$UPSKILL_STAGING_SSH_USER" ]; then echo -e "${RED}Error: Missing required environment variables${NC}" echo "Please ensure .env file exists and contains UPSKILL_STAGING_IP and UPSKILL_STAGING_SSH_USER" exit 1 fi # Set variables REMOTE_HOST="${UPSKILL_STAGING_IP}" REMOTE_USER="${UPSKILL_STAGING_SSH_USER}" REMOTE_PASS="${UPSKILL_STAGING_PASS}" REMOTE_PATH="/home/974670.cloudwaysapps.com/uberrxmprk/public_html" PLUGIN_PATH="${REMOTE_PATH}/wp-content/plugins/hvac-community-events" echo -e "${YELLOW}=== Deploying Zoho CRM Integration Fixes ===${NC}" echo -e "${YELLOW}Target: ${REMOTE_USER}@${REMOTE_HOST}:${PLUGIN_PATH}${NC}" # Create the remote directories echo -e "${YELLOW}Creating directories on remote server...${NC}" sshpass -p "$REMOTE_PASS" ssh -o StrictHostKeyChecking=no "$REMOTE_USER@$REMOTE_HOST" < "$TEMP_DIR/zoho-config.php" << 'EOPHP' "$TEMP_DIR/diagnostics.php" << 'EOPHP'