What's new

MyBookLive (NAS) and ASUS routers (RT-AC66U)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Yes, it's possible. Just make sure there is no any router's reboots on NFS heavy load.

Also, I'm using apcupsd on RT-N66U to shutdown WD My Book Live gracefully in case of power failure.


ryzhov_al,

I'm just curious, will the apcupsd shut down my Asus router gracefully if the battery is low? I'm thinking of buying an APC UPS (apcupsd) so my router with the attached My Book Essential and Live shutdown too. I understand that My Book Essential shuts down on its own if it detects that the router is turned off.

Thanks
 
ryzhov_al,

I'm just curious, will the apcupsd shut down my Asus router gracefully if the battery is low?
Yes, it can be automated via script:
Code:
admin@RT-N66U:/tmp/home/root# cat /opt/etc/apcupsd/mbl_shutdown.sh
#!/bin/sh

# emssh_2.sh v.0.5
# ssh example for empty with job control, STDIN mode and session log
# Though, don't really know who wants to use empty for ssh :)
# Copyright (C) 2005, 2006 Mikhail E. Zakharov
#

ssh="/usr/bin/ssh -y"                           # (/full/path/to/)ssh
target="192.168.1.2"                     # target host
login="root"                            # username
password="welc0me"                      # password

# -----------------------------------------------------------------------------
cmd="$ssh $login@$target"
tmp="/tmp/empty.tmp"                    # tempfile to store results

echo "Starting empty"
empty -f -L $tmp $cmd
if [ $? = 0 ]; then
        echo "Sending Password"
        empty -v -w assword: "$password\n"
        sleep 1
        echo "Sending tests"
        empty -s << EOF

halt
exit
EOF
        echo "Check results:"
        sleep 1
        cat $tmp
        rm -f $tmp
        killall empty
else
        echo "Error: Can't start empty in daemon mode"
        return 1
fi
echo "Done"
It will log on to MBL's ssh console and run halt command. Don't forget to install the empty utility first:
Code:
opkg install empty
 
Last edited:
Wow! this is great :D thank you so much i'll try this one out.. just one more thing though, will the UPS shut my router down too?
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top