Commit dbd8c4f3 authored by Fjen Undso's avatar Fjen Undso
Browse files

fix ftpdelete

parent c326a97b
......@@ -132,6 +132,7 @@ else
fi
### FTP: delete old backups
echo "### Delete old backups on FTP..."
ftpfiles=$(execftp "cd $FTPDIR; nlist; exit")
# filter files starting with a dot
ftpfiles=( $(echo $ftpfiles | sed 's,\.[A-Za-z0-9_\/\.]* , ,g') )
......@@ -143,7 +144,7 @@ else
done
# delete on ftp
[ ${#ftpfilesdelete[@]} -ge 1 ] \
&& ftpfilesdelete=${ftpfilesdelete[@]} \ # lftp has problems with arrays
&& ftpfilesdelete=${ftpfilesdelete[@]} \
&& execftp "cd $FTPDIR; rm -r $ftpfilesdelete; exit"
### FTP: upload
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment