RE: Email alerts - Commands
"Bishop, Dean" <[email protected]>
| Newsgroups | gmane.network.netsaint.user |
|---|---|
| Message-ID | <[email protected]> |
try using "echo -e" in place of printf. this solved a weird, but similar problem i was having. 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