Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # sudo apt-get install git lftp # xfce4-notifyd # notify-osd
- HOST="cgi.server.ru"
- USERNAME="ftp0_username"
- PASSWORD="verySecret123Pwd"
- changed_files=$(git diff main origin/main --name-status)
- ftp_result=$(lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; mirror -Rnev ./ ./domains/your-domain.com/html --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/ --exclude vendor/ --exclude .idea/")
- # notify-send "FTP Result" "$changed_files $ftp_result" # --icon="/var/www/maria/ftp.jpg"
Add Comment
Please, Sign In to add comment