[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RES: [shell-script] Scripts shell e Crontab
From: |
isampbr <address@hidden> |
Subject: |
Re: RES: [shell-script] Scripts shell e Crontab |
Date: |
Tue, 25 Mar 2003 14:21:42 -0000 |
User-agent: |
eGroups-EW/0.82 |
Amigos, desculpem-me pela insistencia mas ainda não estou obtendo os
resultados esperados e venho aqui novamente para pedir ajuda.
Estou enviando abaixo as linhas de código dos scripts em questão.
Este script é execitado pelo cron.
##################################################
#!/bin/sh
CAMINHO="/home/e-mails"
chown x.x $CAMINHO/*.cmd
chmod 777 $CAMINHO/*.cmd
chown x.x $CAMINHO/*.html
chmod 666 $CAMINHO/*.html
for i in $CAMINHO/*.cmd
do
echo $i >> $CAMINHO/execlog
if [ -e $i ]; then
cat $i >> $CAMINHO/execlog
/bin/sh $i
fi
done
mv $CAMINHO/*.cmd $CAMINHO/sent -f
mv $CAMINHO/*.html $CAMINHO/sent -f
chown nobody.nobody $CAMINHO/sent/*
chmod 400 $CAMINHO/sent/*
##################################################
E abaixo um exemplo de dos arquivos .cmd e .html
EMAIL_00392_1.cmd
/usr/bin/metasend -t address@hidden -c address@hidden -s "e-mail 01"
-F address@hidden -f ./EMAIL_00392_1.html -e 7bit -m text/html -b
EMAIL_00392_1.html
<HTML>
<HEAD><STYLE></STYLE></HEAD>
<BODY>
<STRONG><PRE>
Teste
</PRE></STRONG>
</BODY>
</HTML>
#################################################
Bem, o que ocorre é que os arquivos .cmd e .html são gerados no
diretório /home/e-mails por um sistema.
O script send-email é executado pelo cron do usuário 'X', mas não
envia os e-mails em questão.
Os e-mails só são enviados quando o script send-email é executado
'manualmente com as mãos'.
o que ocorre ?