Commit d205e97e authored by Simone Piccardi's avatar Simone Piccardi
Browse files

Modalità interattiva solo se il comando c'è.

parent ed293d4a
......@@ -149,8 +149,9 @@ fi
##
## Command management
##
case "$COMMAND" in
mount)
if [ "$COMMAND" ]; then
case "$COMMAND" in
mount)
if mount $DISK $BASEDIR; then
[ -d $RECOVERDIR ] || mkdir -p $RECOVERDIR
borg mount $DESTINATION $RECOVERDIR
......@@ -163,7 +164,7 @@ case "$COMMAND" in
exit 6
fi
;;
umount)
umount)
fusermount -u $RECOVERDIR
sleep 1
umount $BASEDIR
......@@ -171,14 +172,14 @@ case "$COMMAND" in
echo "backup recover umounted"
exit 0
;;
*)
*)
echo "unknown command $COMMAND"
cat $TMPLOG
usage
exit 5
;;
esac
esac
fi
##
## Batch backup execution (when no command is given)
......
Markdown is supported
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