echo "---------- Backup Script Running... ----------"
if test `date +%A` = "Sunday" && ! -e "/mnt/snap/WebServer/WebSite_Backup/$directoryname"; then
# if it is sunday and you havent yet done a full backup, do so
echo "Performing Weekly Full Backup..."
fullbackup;
elif test ! -e /mnt/snap/WebServer/WebSite_Backup/$current/*full.tar.gz; then
# if there is no current fullbackup, make one
echo "No Current Full Backup - Performing Full Backup Now..."
fullbackup;
else
# otherwise, do an incremental backup
echo "Performing Incremental Backup..."
incrementalbackup;
fi # end if statement
echo "---------- Backup Script Done ----------"