LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-23-2009, 01:55 PM   #1
bob808
LQ Newbie
 
Registered: Jan 2009
Posts: 25

Rep: Reputation: 15
Smile APC UPS - apcupsd on Ubuntu 8.04 not sending emails


--------------------------------------------------------------------------------

Hello, I have an Ubuntu 8.04 server running a samba domain and I have the computer attached to a APC UPS. I installed apcupsd via apt-get. The software runs smooth, it detects the powerouts and acts accordingly (it shuts down the computer when 3 mins of power remaining) but it doesn't notify me via email. Thing is I use ssmtp, i configured it good, modified the onbattery and offbattery scripts, they work when i call them via ./ or sh but not on power loss. they even work when i try "./apccontrol onbattery" or "./onbattery" . I receive the email. but they won't work when the power goes out or in again. What can I do?

permissions are ok, script files look like this:
onbattery:

#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when the UPS
# goes on batteries.
# We send an email message to root to notify him.
#
ssmtp bob@mydomain.com < a

exit 0

and the "a" file:

To: bob@mydomain.com
From: sambaups@mydomain.com
Subject: Power Alert

The Samba Server power supply is out!!!


I don't know what to do, i tryed almost everything. Any ideea is wellcome. Thanks guys and have a nice day
 
Old 04-24-2009, 12:08 PM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
It's possible the application does not have permissions to enter the directory the script is in.

Try to run it from /tmp with permissions or ownership of the apc programs owner/group.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
APC Smart-UPS and apcupsd michaelsr Linux - Software 4 06-24-2014 06:49 AM
APC UPS backup-ups ES RJ-45 augurseer Linux - Hardware 3 11-18-2009 11:32 PM
Trouble with APC UPS userlander Debian 12 07-10-2009 12:36 PM
Anyone Use APC UPS in Debian? carlosinfl Debian 5 04-14-2009 09:54 AM
APC Smart Ups & Ubuntu 5.10 renaissance Ubuntu 1 04-29-2006 03:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration