mirror of
https://github.com/teddysun/across.git
synced 2025-01-18 22:09:35 +08:00
update ftp command check
This commit is contained in:
parent
848c72942a
commit
c080870f45
10
backup.sh
10
backup.sh
@ -99,7 +99,7 @@ log() {
|
|||||||
# Check for list of mandatory binaries
|
# Check for list of mandatory binaries
|
||||||
check_commands() {
|
check_commands() {
|
||||||
# This section checks for all of the binaries used in the backup
|
# This section checks for all of the binaries used in the backup
|
||||||
BINARIES=( cat cd du date dirname echo openssl mysql mysqldump pwd rm tar ftp )
|
BINARIES=( cat cd du date dirname echo openssl mysql mysqldump pwd rm tar )
|
||||||
|
|
||||||
# Iterate over the list of binaries, and if one isn't found, abort
|
# Iterate over the list of binaries, and if one isn't found, abort
|
||||||
for BINARY in "${BINARIES[@]}"; do
|
for BINARY in "${BINARIES[@]}"; do
|
||||||
@ -114,6 +114,14 @@ check_commands() {
|
|||||||
if [ "$(command -v "gdrive")" ]; then
|
if [ "$(command -v "gdrive")" ]; then
|
||||||
GDRIVE_COMMAND=true
|
GDRIVE_COMMAND=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check ftp command
|
||||||
|
if ${FTP_FLG}; then
|
||||||
|
if [ ! "$(command -v "ftp")" ]; then
|
||||||
|
log "ftp is not installed. Install it and try again"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
calculate_size() {
|
calculate_size() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user