Hello,
i try to send a http-command when shutting down my raspberry via the menu.
I put the command in the shutdown.sh:
Code
#/bin/sh
case "$1" in
halt)
# your commands here
;;
poweroff)
# your commands here
curl http://ip.to.device/cm?cmnd=Var1%201
;;
reboot)
# your commands here
;;
*)
# your commands here
;;
esac
Display More
This command woks as tested in a different script.
It seems, that the network (in this case wifi) is closed before the script is able to issue the command.
Is there anything i can do about it? (wifi and shutting down via menu are a must)
Thanks in advance,
Chromo