I'm trying to run a script right before my Pi shuts down. OS: Raspbian Stretch
Here is what I did so fare:
- put my script (name: sendir) in /etc/init.d/
- created a symbolic link to it in /etc/rc6.d with the name K99sendir
The script is executable and if I run it inside /etc/rc6.d via ./K99sendir it works but it does not work when I actually shutdown the system.
This is what the script looks like:
#!/bin/bash irsend SEND_ONCE ph_remote KEY_POWER
Does anybody have an idea what's missing?