LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 02: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, 01:08 PM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 37
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:49 AM
APC UPS backup-ups ES RJ-45 augurseer Linux - Hardware 3 11-19-2009 12:32 AM
Trouble with APC UPS userlander Debian 12 07-10-2009 01:36 PM
Anyone Use APC UPS in Debian? carlosinfl Debian 5 04-14-2009 10:54 AM
APC Smart Ups & Ubuntu 5.10 renaissance Ubuntu 1 04-29-2006 04:46 AM

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

All times are GMT -5. The time now is 10:20 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