You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
579 B

  1. #!/bin/bash
  2. RCODE=$?
  3. if [ $(id -u) -eq 0 ]
  4. then
  5. echo "Ce script ne doit pas être lancé en tant que root"
  6. exit 1
  7. fi
  8. for mailbox in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;
  9. do
  10. echo "Importing mailbox : $user" ;zmmailbox -z -t 0 -m $mailbox postRestURL -u "https://127.0.0.1:7071" "//?fmt=tgz&resolve=modify" /opt/zimbra/nfsbackup/migration/archives/$mailbox.tgz ; echo "$mailbox - done ";
  11. done
  12. if [ $RCODE -eq 1 ]; then
  13. echo "erreur dans l'import'"
  14. exit 1;
  15. fi
  16. if [ $RCODE -eq 0 ]; then
  17. echo "Import terminée'"
  18. exit;
  19. fi