James,
I've done what I believe is correct, which is exactly what you've done. The script executes in terminal but when it says it is running in ekos it does not do what it is supposed to do. I'm going to suggest that there is something I don't know about how Ekos executes shutdown scripts. I used to use scripts all of the time to move images from the default directories to the proper directories in between each capture and that worked perfectly.
Dave
I always have a VNC open and manually shut the Pi down with sudo shutdown -h now, which I assume works because the Pi goes away. I would test it on my Pi, but the Pi is outside and the ambient temp is 115F. I'l have to wait until it cools off a little before I go out and power it up. I will later. I have to know.
So, after downloading the EKOS source code and getting to the point where the QT process launches for shutdown I finally managed to figure it out, I was simply missing #!/bin/bash from the start of the script, this works:
I did mention a lot of posts ago when I gave you my examples that you needed that, it’s not a script without it…I said it had to be a bash script and you said you had done that…?? could have saved yourself a bit of time there….
When I asked explicitly "Does it care about any headers or file extensions or should it literally just contain that one line?" I needed "No, it has to have a header"
All the examples were just one liners but it needs to be a defined script at the top (not necessarily bash I might add), I'm getting there now though but thanks for chipping in
This was my example….from earlier not a 1 liner…its not a script without the bin/bash, I also posted that too….
but never mind you have sorted it now….
Have you tried
#!/bin/bash
sudo systemctl poweroff