![]() |
|
#1
|
|||
|
|||
Automatic shut down for our linux boxes via our UPSAll Gurus
I am very new to Linux and im trying to setup an automatic shut down for our linux boxes via our UPS (if there’s a power outage). The UPS only allows a batch file to be run so ive come up with this idea... I’ve come across plink to allow me to run the Linux command in a batch file: plink 10.10.60.30 -l root -pw <password> -ssh /nas/sbin/nas_halt now This works fine but after this command it prompts for a yes. Nas_halt command has no auto setting to input yes so it just sits there waiting for input. Is there any way I could set this up? e.g getting plink to call a Linux script which calls nas_halt and inputs the yes after?? If so what would this be? Any help would be superb. Cheers Baker0 |
|||
|
#2
|
||||
|
||||
Re: Automatic shut down for our linux boxes via our UPSI am certainly no guru but why can't you use the shutdown command in your script?
Code:
|
|
#3
|
|||
|
|||
Re: Automatic shut down for our linux boxes via our UPSHello, thanks for the quick reply. Does the shutdown command shut down the nas part of the server cleanly?
|
|
#4
|
||||
|
||||
Re: Automatic shut down for our linux boxes via our UPSTyping man shutdown explains it all. I'll copy (and paste) the description below as well:
Quote:
|
|
#5
|
|||
|
|||
Re: Automatic shut down for our linux boxes via our UPSIve just been infomed that we cant use a shutdown command because its not shutting down the nas. So i do need a script for nas_halt with some sort of yes auto input after the command... any ideas?
Cheers |
|
#6
|
||||
|
||||
Re: Automatic shut down for our linux boxes via our UPSI am sorry Baker0, before today I only knew that NAS are commonly running on Linux and I assumed it was as simple as that. Reading up a bit more on the subject now I realise that this is not the case.
|
|
#7
|
||||
|
||||
Re: Automatic shut down for our linux boxes via our UPSQuote:
Since no one is offering a script to do this, would you be interested in one written in PHP (for the command line)? Can your server run PHP scripts? In other words, is PHP installed on your server? |
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How To Remove Linux And Install Windows? | rockaway | Computer Software Forum - Windows | 3 | 06-Mar-2008 21:00 |
| Web stats | fcolor | Web Design Forum | 10 | 12-Jul-2007 08:48 |
| Need Free Website Templates | sam_dezine | Web Design Forum | 8 | 06-Sep-2006 03:25 |
| Pixel script Template customization | gatufats | Web Design Forum | 2 | 29-Jun-2006 04:05 |
| HTML Code | amgujral | Web Design Forum | 0 | 07-Apr-2006 09:46 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The