Shell script to remote control some aspects of rock (powerdown, reboot, wake on LAN, etc.)

I created a shell script because sometimes it is easier for me to run a command than open a Webbrowser and control ROCK from there.

You can find it here: https://github.com/bilbo-b/rock

it can:

poweroff:  shuts down gracefully and powers off at $ROCKIP
wake:      sends "magic packet" to ROCK over network to power on
status:    gives back some JSON-formatted status output of ROCK at $ROCKIP
has_cdrom: outputs "no_cd_rom" if none connected or other
eject:     ejects disk in a connected CDROM (if one is connected)
reboot:    reboots your ROCK
restart:   restarts ROON software
stop:      stops ROON software 
wake:      sends "magic packet" to ROCK over network to power on

requirements:
poweroff, status, has_cdrom, eject, reboot, restart, stop need "curl"
wake needs "etherwake" and the proper mac-address in /etc/ethers for "rock"
status, has_cdrom and eject need "jq" installed

As always: if you have questions, suggestions or find problems, please let me know (e.g. in twitter @bilbo_b )


Posted

in

by

Tags: