Caros colegas
Estou enfrentando problemas no seguinte script
# Password to bind to ldap server
systempass="1"
# Bind dn
binddn="ou=postfix,dc=mould,dc=net"
# Acount leave
accountleave="ou=users,dc=mould,dc=net"
# ldap host
ldaphost="mould.net"
# Maildir name
maildir="Maildir/"
# Mail users home name
homedir="/home/vmail"
# Mail user's group
group="vmail"
usernames='ldapsearch -h $ldaphost -x -w $systempass -D "$binddn" -b
"$accountleave" "(!(quota=-1))" uid | grep "^[^#]" | grep "^[^dn]" |
grep uid | awk '{ print $2 }''
# create personal mailfolders
for username in $usernames
do
homedirectory='ldapsearch -h $ldaphost -x -w $systempass -D "$binddn" \
-b "$accountleave" "(uid=$username)" homeDirectory \
| grep "^[^#]" | grep homeDirectory | grep "$homedir" \
| awk '{ print $2 }''
if [ ! -d $homedirectory/$maildir ] && [ ! -z $homedirectory ]
then
mkdir -p -m 2750 $homedirectory
maildirmake $homedirectory/$maildir
if [ ! -f $homedirectory/.procmailrc ]
then
echo -ne "PATH=/usr/bin:/bin:/usr/local/bin:.\nMAILDIR=\$HOME/Maildir\n\DEFAULT=\$MAILDIR/" > $homedirectory/.procmailrc
fi
chown -R $username.$group $homedirectory
fi
done
Me retorna o erro
Warning: unknown mime-type for "}" -- using "application/*"
Error: no such file "}"
O que pode estar errado ?
- Erro de shell script Mateus Pedroso
- Re: Erro de shell script Marcos Vinicius Lazarini