Appending usage information to EMAIL_SUBJECT
modified: duplicity-backup.sh
This commit is contained in:
parent
a749d24901
commit
20ded180e8
1 changed files with 4 additions and 2 deletions
6
duplicity-backup.sh
Executable file → Normal file
6
duplicity-backup.sh
Executable file → Normal file
|
|
@ -401,8 +401,10 @@ get_remote_file_size()
|
|||
"ss")
|
||||
TMPDEST="${DEST#*://*/}"
|
||||
TMPDEST="${DEST%/${TMPDEST}}"
|
||||
ssh_opt=`echo $STATIC_OPTIONS |perl -ne 'print "-i $1" if (/IdentityFile=
|
||||
SIZE=`${TMPDEST%://*} ${ssh_opt} ${TMPDEST#*//} du -hs ${DEST#${TMPDEST}/
|
||||
ssh_opt=`echo $STATIC_OPTIONS |perl -ne 'print "-i $1" if (/IdentityFile="?([^"]*)/);'`
|
||||
|
||||
SIZE=`${TMPDEST%://*} ${ssh_opt} ${TMPDEST#*//} du -hs ${DEST#${TMPDEST}/} | awk '{print $1}'` 2>> ${LOGFILE}
|
||||
EMAIL_SUBJECT="$EMAIL_SUBJECT $SIZE `${TMPDEST%://*} ${ssh_opt} ${TMPDEST#*//} df -hP ${DEST#${TMPDEST}/} | awk '{tmp=$5 " used"}END{print tmp}'`" 2>> ${LOGFILE}
|
||||
;;
|
||||
"fi")
|
||||
TMPDEST=`echo ${DEST} | cut -c 6-`
|
||||
|
|
|
|||
Loading…
Reference in a new issue