RE: Email alerts - Commands
Karl DeBisschop <[email protected]>
| Newsgroups | gmane.network.netsaint.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2002-08-14 at 08:01, Bishop, Dean wrote: > try using "echo -e" in place of printf. > > this solved a weird, but similar problem i was having. 1) echo -e is not POSIX compliant, printf is. 2) that will not solve the problem -- the single quote before TEST closes the command sring, as I read it. Try escaping your quotes. Better yet, run in daemon mode as netsaint, and netsaint should automatically be the mail sender. > > hth, > dean > > -----Original Message----- > From: Joe Leone [mailto:[email protected]] > Sent: Wednesday, August 14, 2002 12:43 AM > To: [email protected] > Subject: [netsaint] Email alerts - Commands > > > Hi, I am trying to run a command as a specific user (eg netsaint). In the > commands.cfg file I have the following definition. > > command[email_user]='/usr/bin/su - netsaint -c "/usr/bin/printf 'TEST > NETSAINT test from commands file $HOSTADDRESS$*' | /usr/ucb/mail -s "TEST > $HOSTNAME$" [email protected]"' > > However netsaint puts out the following error message. > > sh: /usr/bin/su - netsaint -c "/usr/bin/printf TEST: not found > The command does run from the prompt. I have also tried with a variety of > different quote combinations > > The ultimate aim is to have mail being send out from user netsaint not root. > (I asked this question before, but did not solve it) > > Thanks Joe > > > ------------------------------------------------------- > This sf.net email is sponsored by: Dice - The leading online job board > for high-tech professionals. Search and apply for tech jobs today! > http://seeker.dice.com/seeker.epl?rel_code1 > _______________________________________________ > Netsaint-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/netsaint-users > > > ------------------------------------------------------- > This sf.net email is sponsored by: Dice - The leading online job board > for high-tech professionals. Search and apply for tech jobs today! > http://seeker.dice.com/seeker.epl?rel_code=31 > _______________________________________________ > Netsaint-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/netsaint-users ------------------------------------------------------- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31