Browse Source

Mise à jour de 'zimbra/Migration/6_imports_filters_and_sig.sh'

master
nicolas.fort 9 months ago
parent
commit
5ca96ec5ec
  1. 10
      zimbra/Migration/6_imports_filters_and_sig.sh

10
zimbra/Migration/6_imports_filters_and_sig.sh

@ -1,12 +1,14 @@
#!/bin/bash #!/bin/bash
RCODE=$? RCODE=$?
if [ ! whoami = "zimbra" ]; then
echo "Le user doit être zimbra, pas root ! "
exit 1;
if [ $(id -u) -eq 0 ]
then
echo "Ce script ne doit pas être lancé en tant que root"
exit 1
fi fi
echo "Import des Filtres" echo "Import des Filtres"
for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`; do echo "Importation des filtres : $user"; zmprov ma $user zimbraMailSieveScript "`cat /opt/zimbra/nfsbackup/migration/filters/$user-filters.txt`";done for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`; do echo "Importation des filtres : $user"; zmprov ma $user zimbraMailSieveScript "`cat /opt/zimbra/nfsbackup/migration/filters/$user-filters.txt`";done
if [ $RCODE -eq 1 ]; then if [ $RCODE -eq 1 ]; then

Loading…
Cancel
Save