- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: New mail triggering a script to turn off compu...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2011 09:04 AM
тАО04-27-2011 09:04 AM
New mail triggering a script to turn off computer
I am working in a linux lab at OSU. We have a UPS that sends a mail(gmail or any) if there is any power cut. I would like the workstation to execute shutdown script when this mail is dispatched by the UPS. Can any one help me out?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2011 11:17 AM
тАО04-27-2011 11:17 AM
Re: New mail triggering a script to turn off computer
Not a very detailed description of anything.
sizer -v
(Unless you're lost, in which case:
uname -a
might be more informative.)
Generally, I'd start with:
man forward
and look for "|". It might be reasonable to
create a special user name (alias) for this
kind of e-mail.
man aliases
I've never tried to run "shutdown" this way,
so there may be complications in dealing with
it (or any other, similarly privileged
program) from a "forward" environment. Some
experimentation may be required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2011 01:21 PM
тАО04-27-2011 01:21 PM
Re: New mail triggering a script to turn off computer
Thanks,
Sujith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2011 01:42 PM - last edited on тАО08-02-2011 09:03 AM by Kevin_Paul
тАО04-27-2011 01:42 PM - last edited on тАО08-02-2011 09:03 AM by Kevin_Paul
Re: New mail triggering a script to turn off computer
> [...] linux [...]
You're asking this in a Tru64 UNIX forum, not
in a Linux forum. (What led you here?)
> [...] what to explain?
> sizer -v
> uname -a
First, I was hoping that you'd run those
commands, and post their output, so that I
might not need to guess the kind of system
you're asking about. If it really is some
kind of Linux, then you might reveal which
Linux distribution you're using.
> man forward
> and look for "|".
Did you try that? If you're running
something other than sendmail on a Tru64
system, then you may need to look somewhere
else to learn how to get your particular mail
delivery program to run a script, but my
psychic powers are too weak to be of much use
in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-01-2011 10:58 PM
тАО05-01-2011 10:58 PM
Re: New mail triggering a script to turn off computer
why do you need to act on an e-mail?
is this workstation so far away from the PSU?
most PSU's supply a physical connection (often DB9 connector) to signal the connected devices of a power failure.
and they supply software too that will initiate the shutdown action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2011 02:50 AM
тАО05-04-2011 02:50 AM
Re: New mail triggering a script to turn off computer
Outlook events have a problem that some of them are only executed while Outlook is running, and normally nobody will think twice about closing an email program.
But if the UPS can send email, that indicates it has network connectivity. It probably can do other network protocols too, and those protocols might be more suitable for constant monitoring. For example, if the UPS supports Simple Network Management Protocol (SNMP), the snmp-ups driver of the NUT UPS monitoring suite might work with it.
See: http://www.networkupstools.org
The NUT suite is included in many Linux distributions, so if you're using Linux, you can probably install it using your distribution's package management tools, and your Linux distribution may even include some specific documentation about configuring it. If you cannot find any distribution-specific documentation, use the documentation on the www.networkupstools.org website.
The NUT suite supports many UPS hardware vendors and many Unix-style operating systems. There are even NUT clients for Windows.
MK