remove trailing slash
This commit is contained in:
12
vmbackup.sh
12
vmbackup.sh
@@ -24,11 +24,11 @@ fi
|
||||
|
||||
outputdir=${basedir}/$(date -I)
|
||||
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo "Usage: $O vm"
|
||||
echo "Stop, backup and start given vm"
|
||||
_exit 42
|
||||
fi
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo "Usage: $O vm"
|
||||
echo "Stop, backup and start given vm"
|
||||
_exit 42
|
||||
fi
|
||||
|
||||
function checkRunning {
|
||||
local machine=$1
|
||||
@@ -53,6 +53,6 @@ if ( checkRunning $machine ) ; then
|
||||
test $ret -eq 0 && find ${basedir} -maxdepth 1 -type d -mtime +7 -exec echo rm -fr {} \;
|
||||
umount /mnt/backups &> /dev/null
|
||||
_exit $ret
|
||||
fi
|
||||
fi
|
||||
_mail "vm $machine not running"
|
||||
_exit 43
|
||||
|
||||
Reference in New Issue
Block a user