Every time azureus restarts (crashes out), I have a script to send an email.
#!/bin/bash mailx -s"Azureus has restarted" me@me.place \n "It's probably crashed again."
Put in the new line as was getting, a second mail with: Null message body; hope that's ok
But, now am getting no mail.
The script is hooked into my vuze.service ExecStartPost=/etc/scripts/azrestart # script has been chmod+x
Am 12.06.2013 09:27, schrieb Frank Murphy:
Every time azureus restarts (crashes out), I have a script to send an email.
#!/bin/bash mailx -s"Azureus has restarted" me@me.place \n "It's probably crashed again."
Put in the new line as was getting, a second mail with: Null message body; hope that's ok
But, now am getting no mail
well is your MTA running? is "me@me.place" at the same machine and if not is /eta/aliases configured? what says /var/log/maillog
mailx does nothing else than invoke the "sendmail" binary shipped with sendmail/postfix/exim
On Wed, 12 Jun 2013 10:12:52 +0200 Reindl Harald h.reindl@thelounge.net wrote:
well is your MTA running? is "me@me.place" at the same machine and if not is /eta/aliases
exim is running, me@my.place , is a different box, is set up in /etc/aliases, newaliases was run.
configured? what says /var/log/maillog
Does not appear to exist, but have /var/log/exim/exim.log and ~/exim/panic.log neither show anything
Maybe "touch /var/log/maillog"
Am 12.06.2013 10:19, schrieb Frank Murphy:
what says /var/log/maillog
Does not appear to exist
i am a postfix user
but have /var/log/exim/exim.log and ~/exim/panic.log neither show anything
than most likely nothing has happened did you test "mail whatever address" *outside a shell script*?
Maybe "touch /var/log/maillog"
no - how should this help if exim is using his own log-files?
On Wed, 12 Jun 2013 10:12:52 +0200 Reindl Harald h.reindl@thelounge.net wrote:
Apologies for re-arranging Harald said something which got me thinking 1:
1:
mailx does nothing else than invoke the "sendmail" binary shipped with sendmail/postfix/exim
Am 12.06.2013 09:27, schrieb Frank Murphy:
#!/bin/bash mailx -s"Azureus has restarted" me@me.place \n "It's probably crashed again."
Changed this to: echo "It's probably crashed again." | mailx -s "Azureus has restarted" me@me.place
Now working, with no second "null message ..."
Am 12.06.2013 09:27, schrieb Frank Murphy:
Every time azureus restarts (crashes out), I have a script to send an email.
#!/bin/bash mailx -s"Azureus has restarted" me@me.place \n "It's probably crashed again."
echo "It's probably crashed again." | mail -s "Azureus has restarted" me@me.place
Put in the new line as was getting, a second mail with: Null message body; hope that's ok
But, now am getting no mail.
The script is hooked into my vuze.service ExecStartPost=/etc/scripts/azrestart # script has been chmod+x
Alexander
On Wed, 12 Jun 2013 10:27:35 +0200 Alexander Dalloz ad+lists@uni-x.org wrote:
Am 12.06.2013 09:27, schrieb Frank Murphy:
#!/bin/bash mailx -s"Azureus has restarted" me@me.place \n "It's probably crashed again."
echo "It's probably crashed again." | mail -s "Azureus has restarted" me@me.place
Thanks Alexander, That's what has worked
On 06/12/2013 01:27 AM, Alexander Dalloz issued this missive:
Am 12.06.2013 09:27, schrieb Frank Murphy:
Every time azureus restarts (crashes out), I have a script to send an email.
#!/bin/bash mailx -s"Azureus has restarted" me@me.place \n "It's probably crashed again."
echo "It's probably crashed again." | mail -s "Azureus has restarted" me@me.place
Or:
mailx -s "Azureus has restarted" me@me.place <<-EOF <tab>It's crashed again. EOF
("<tab>" is a real TAB character). Put whatever you want before "EOF", indented with tabs for appearance' sake. For details look at the "Here Documents" part of "man bash". Very useful. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - "Celibacy is not hereditary." - - -- Guy Goden - ----------------------------------------------------------------------