Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84584members
353850posts

PowerChute 2.2.3 - Solaris 10 (SPARC): UPS On Battery, Run Command File...

APC UPS Data Center & Enterprise Solutions Forum

Schneider Electric support forum for our Data Center and Business Power UPS, UPS Accessories, Software, Services, and associated commercial products designed to share knowledge, installation, and configuration.

Solved
charlescva_apc
Crewman
Crewman
0 Likes
1
149

PowerChute 2.2.3 - Solaris 10 (SPARC): UPS On Battery, Run Command File...

This was originally posted on APC forums on 3/16/2010


Hello,
I am trying to run a database shutdown script before the UPS goes on battery. The other events are working (system shutdown) but of course i want to be able to bring down the database with a script before the system does a shutdown.

The issue is, the shutdown script has commands in it like, 'sqlplus'. If the script is run as "oracle" user, it works fine. However if i log into root and type 'sqlplus' i get sqlplus: not found.

My question is, will the powerchute service run the script for On Battery event as root? if so, how do i make root able to run this shutdown script?

Thanks,
Charles

Message was edited by: charlescva

Message was edited by: charlescva


Accepted Solutions
charlescva_apc
Crewman
Crewman
0 Likes
0
149

Re: PowerChute 2.2.3 - Solaris 10 (SPARC): UPS On Battery, Run Command File...

This was originally posted on APC forums on 3/16/2010


think i figured it out... instead of running the script, the command

su - username -c "/path/to/script.sh"

works well from root prompt... so i will assume that powerchute will run as root and will do the same thing. Now if I can just figure out how to monitor the powerchute console session when i unplug the systems to see if its actually executing the scripts.

Message was edited by: charlescva

See Answer In Context

1 Reply 1
charlescva_apc
Crewman
Crewman
0 Likes
0
150

Re: PowerChute 2.2.3 - Solaris 10 (SPARC): UPS On Battery, Run Command File...

This was originally posted on APC forums on 3/16/2010


think i figured it out... instead of running the script, the command

su - username -c "/path/to/script.sh"

works well from root prompt... so i will assume that powerchute will run as root and will do the same thing. Now if I can just figure out how to monitor the powerchute console session when i unplug the systems to see if its actually executing the scripts.

Message was edited by: charlescva