hello,
i just joined this forum couse im expirimenting with the FreeNas OS for my near future NAS system.
now i was looking around and trying to find a shell script for an auto shutdown and Turn on.
whilie i was looking for this i found this script:
this seemed promissing till found out the only writing program i find to work (sort off) is VI now i dontk now how this works.
so here the ultimate question/suggestion:
Question:
is there a way to get this auto turn on/power off to get working?? (doest need to be IP based but that would be awsome)
Suggestion:
Make an auto configuration on the web GUI so people who dont need their NAS 24/7 that they can make it shutdown and turn on at certain times.
thx!!
joppie908
P.s plz don't pay to much atention to my spelling i know its horrible :P
i just joined this forum couse im expirimenting with the FreeNas OS for my near future NAS system.
now i was looking around and trying to find a shell script for an auto shutdown and Turn on.
whilie i was looking for this i found this script:
#!/usr/bin/env python
from subprocess import Popen, PIPE
import os, sys
ip_list = []
###### IP addresses #####
# IP addresses go underneath this line, one on each line in the format: ip_list.append('x.x.x.x')
###### End IP addresses
shutdown = True
for ip in ip_list:
cmd = ['/sbin/ping', '-s 0', '-W 1', '-q', '-n' , '-c 1', ip]
p1 = Popen(cmd, stdout=PIPE, stderr=PIPE)
p1.wait()
statusText = p1.communicate()[0].split('\n')[3].strip()
if statusText.find(', 0.0% packet loss') > 0:
shutdown = False
if shutdown:
cmd = ['/sbin/shutdown', '-p', 'now']
p1 = Popen(cmd)
this seemed promissing till found out the only writing program i find to work (sort off) is VI now i dontk now how this works.
so here the ultimate question/suggestion:
Question:
is there a way to get this auto turn on/power off to get working?? (doest need to be IP based but that would be awsome)
Suggestion:
Make an auto configuration on the web GUI so people who dont need their NAS 24/7 that they can make it shutdown and turn on at certain times.
thx!!
joppie908
P.s plz don't pay to much atention to my spelling i know its horrible :P