2009-01-30, 12:23
Hi,
I am trying to modify the script to shutdown my LACIE NAS and then turn-off the Xbox. However, I found that if my NAS is already switched off, the scripts returns error and exits . The subsequent commands are therefore skipped and the Xbox not turned off. I just like the script to test the NAS whether it's on, if its on, then switch it off, if it's already off, then switch off the Xbox only. Is there a way to do that? Can I ping the NAS and if a response is received, then execute the shutdown code, if it's alraedy off, then proceed to shutdown XBMC.
I am trying to modify the script to shutdown my LACIE NAS and then turn-off the Xbox. However, I found that if my NAS is already switched off, the scripts returns error and exits . The subsequent commands are therefore skipped and the Xbox not turned off. I just like the script to test the NAS whether it's on, if its on, then switch it off, if it's already off, then switch off the Xbox only. Is there a way to do that? Can I ping the NAS and if a response is received, then execute the shutdown code, if it's alraedy off, then proceed to shutdown XBMC.