Skip to content

Instantly share code, notes, and snippets.

@aiolos
Created August 1, 2016 07:52
Show Gist options
  • Save aiolos/0e81c05556ee41962c53bd935d0eabe8 to your computer and use it in GitHub Desktop.
Save aiolos/0e81c05556ee41962c53bd935d0eabe8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Save this file in /storage/.config/shutdown.sh on OpenElec
case "$1" in
halt)
# your commands here
/usr/bin/curl "http://192.168.1.49:8080/json.htm?type=command&param=switchscene&idx=4&switchcmd=Off"
;;
poweroff)
# your commands here
/usr/bin/curl "http://192.168.1.49:8080/json.htm?type=command&param=switchscene&idx=4&switchcmd=Off"
;;
reboot)
# your commands here
;;
*)
# your commands here
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment