webmoney/deploy-landing.sh

40 lines
903 B
Bash
Executable File

#!/bin/bash
# Deploy landing page to cnxifly.com
# Usage: ./deploy-landing.sh [live|maintenance]
MODE=${1:-live}
SERVER="root@213.165.93.60"
PASSWORD="Master9354"
DEST="/var/www/cnxifly"
echo "🚀 Deploying cnxifly.com landing page in mode: $MODE"
if [ "$MODE" = "live" ]; then
SOURCE="landing/index.html"
elif [ "$MODE" = "maintenance" ]; then
SOURCE="landing/maintenance.html"
else
echo "❌ Invalid mode. Use: live or maintenance"
exit 1
fi
# Check if source file exists
if [ ! -f "$SOURCE" ]; then
echo "❌ Source file not found: $SOURCE"
exit 1
fi
echo "📁 Copying $SOURCE to server..."
# Deploy the file
sshpass -p "$PASSWORD" scp -o StrictHostKeyChecking=no "$SOURCE" "$SERVER:$DEST/index.html"
if [ $? -eq 0 ]; then
echo "✅ Landing page deployed successfully!"
echo "🌐 Visit: https://cnxifly.com"
else
echo "❌ Deploy failed!"
exit 1
fi