Created
June 11, 2021 14:49
-
-
Save svinouze/ae65c913ffe255e890ba06c8e6fe6d6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# connect to FTP | |
echo open $FTP_HOST >> ftp.txt | |
echo user $FTP_USER $FTP_PWD >> ftp.txt | |
# archive file | |
echo "mmv -O $FTP_DIR/Archives $FTP_DIR/$FTP_FILE" >> ftp.txt | |
# upload to FTP | |
echo "put -O $FTP_DIR $FTP_FILE" >> ftp.txt | |
# execute script | |
lftp -f ftp.txt | |
# cleanup | |
rm ftp.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment