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