Re: User level service

From: Charlie Brady <charlieb-supervision_at_budge.apana.org.au>
Date: Wed, 11 Sep 2013 12:39:01 -0400 (EDT)

 
On Wed, 11 Sep 2013, Subba Rao wrote:

> Now I would like to setup a user level service which uses ssmtp to send out
> reminders. The script looks as follows:
>
> ===============
> #!/bin/sh
> while :
> do
> ssmtp myemail_at_yahoo.com <mailto:myemail_at_yahoo.com> <
> /home/user1/reminders/reminder1.txt
> echo `date`: "Testing email script..." >> ./log.txt
> sleep 5000
> done
> ===============
>
> All this was created as root on my Raspbian. The "log.txt" file has entries
> for each interation but there is no email sent out. If I typed in the ssmtp
> command in a terminal then the email does go out. What am I missing here?

Your question more concerns ssmtp than runit. I suspect something is
missing in the environment. What do you see when you do:

env - ssmtp ...

?

Do you really have '<mailto:myemail_at_yahoo.com>' without quotes on the
command line in your shell script? That should cause redirection errors.

If you are familiar with strace you can always use that to investigate
misbehaving services.
Received on Wed Sep 11 2013 - 16:39:01 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC