-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-ftp.sh
More file actions
executable file
·50 lines (43 loc) · 1.28 KB
/
deploy-ftp.sh
File metadata and controls
executable file
·50 lines (43 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# ============================================================
# CoupleTimer – FTP Deployment (Fallback wenn kein SSH)
# Benötigt: lftp installiert → brew install lftp
# ============================================================
# Verwendung:
# ./deploy-ftp.sh <FTP-USER> <FTP-PASSWORD> <FTP-HOST>
#
# FTP-Zugangsdaten in Hostinger hPanel:
# hPanel → Hosting → FTP Accounts
# ============================================================
FTP_USER="${1:-}"
FTP_PASS="${2:-}"
FTP_HOST="${3:-coupletimer.site}"
REMOTE_DIR="/public_html"
LOCAL_DIST="./app/dist"
if [ -z "$FTP_USER" ] || [ -z "$FTP_PASS" ]; then
echo "❌ Verwendung: ./deploy-ftp.sh <USER> <PASSWORD> [HOST]"
exit 1
fi
# Sicherstellen dass lftp installiert ist
if ! command -v lftp &> /dev/null; then
echo "📦 Installiere lftp..."
brew install lftp
fi
echo "🔨 Baue Projekt..."
cd app
node_modules/.bin/tsc -b
node_modules/.bin/vite build
cd ..
echo ""
echo "📤 Upload via FTP nach $FTP_HOST$REMOTE_DIR..."
lftp -u "$FTP_USER","$FTP_PASS" ftp://"$FTP_HOST" <<EOF
set ssl:verify-certificate no
set ftp:ssl-allow yes
mirror --reverse --delete --verbose \
--exclude='.DS_Store' \
${LOCAL_DIST}/ ${REMOTE_DIR}/
bye
EOF
echo ""
echo "✅ Upload abgeschlossen!"
echo "🌐 https://coupletimer.site"