Page 1 of 1

Autoshutdown

PostPosted: Sun Jul 10, 2016 10:49 am
by wd9895
Hi fvdw, hi Jocko,

I've seen a firmware plug-in on Openmediavault which I used on my self-build NAS which is called "Autoshutdown".
This is a nice background task which has a look on active IP addresses in you home network. You can configure the IP adresses (or ranges) which should be watched and if not available the NAS closed down.

I think this is quite a usefull plug.in / script to be implemented in the firmware.

Link
https://bintray.com/openmediavault-plug ... tdown/view

http://adomatp.de/index.php/homeservern ... toshutdown

Re: Autoshutdown

PostPosted: Sun Jul 10, 2016 11:40 am
by Jocko
Thank you for this suggestion.

I read quickly the quoted pages and if I understand well this one "http://adomatp.de", the autoshutdown feature can be used on 2 ways :
- set a shutdown at a wanted time
- perform a shutdown if no monitored hosts is running

The first case is already available on fvdw-sl and more with wol option or autowakeup and for 2d case, I think it can be easily implemented without external support:
- add some fields in the start/shutdown menu to select the wanted list of host and set a cron job to schedule a script like this one available from your page
Code: Select all
#!/bin/sh

[ ! -f  "/rw_fs/etc/ipadress.txt" ] && exit 0
hosts=`cat /rw_fs/etc/ipadress.txt`

for ip in $hosts
do
ping -c 4 $ip
if [ $? = 0 ]
then
exit 0
fi
done
/bin/sync
/sbin/standbyd-spd
exit 0
(where ipadress.txt is the file containing the monitored ip )

I think we can improve this feature instead of running only a shutdown we can offer the choice between shutdown or a wol standby or a autowakeup

Re: Autoshutdown

PostPosted: Sun Jul 10, 2016 12:31 pm
by wd9895
Thanks. Very kind !

Re: Autoshutdown

PostPosted: Tue Aug 09, 2016 8:27 pm
by Jocko
Hi wd9895,

Your suggestion is now implemented on the next version :
- In the shutdown/restart menu, you may select which host must be monitored on shutdown/standby performed by a cron job
avdsettings.jpg

- In the Schedule servers menu, you may enable the option when you select the cron jobs : shutdown/ standby with wol or standby with auto wake-up
enable_opt.jpg

Re: Autoshutdown

PostPosted: Tue Aug 09, 2016 8:43 pm
by wd9895
Wow wow wow.

I'm curios about to test it .
When do you plan to issue the new version?

Re: Autoshutdown

PostPosted: Wed Aug 10, 2016 8:14 am
by Jocko
Hi wd9895,

No release date has been set yet (we need more free time to do it)