Sure.
Code
# cat /storage/.config/shutdown.sh
case "$1" in
halt)
# your commands here
;;
poweroff)
/storage/.config/fuckme.sh
;;
reboot)
# your commands here
;;
*)
# your commands here
;;
esac
Display More
Code
# cat /storage/.config/fuckme.sh
#!/bin/sh
/usr/bin/ssh -i /storage/.ssh/id_rsa 192.168.178.43 /sbin/poweroff
This script works perfectly when i ran it from the shell.