×

INDI Library v1.9.2 Released (14 Sep 2021)

Bimonthly Stable INDI Library release introduces new drivers and fixes for existing ones.

How to shut down a Pi from EKOS

  • Posts: 97
  • Thank you received: 12
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
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB Indi server, Raspberry Pi 4B 4GB test server
Linux client
3 months 1 week ago #72431

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
Thanks for checking and glad to hear it's not just me. I was getting to all kinds of crazy python code when I saw your message!

So unfortunately I can't execute a shutdown script, are there any other options to make the pi shutdown at a fixed time do you know?
3 months 1 week ago #72433

Please Log in or Create an account to join the conversation.

  • Posts: 97
  • Thank you received: 12
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.
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB Indi server, Raspberry Pi 4B 4GB test server
Linux client
3 months 1 week ago #72434

Please Log in or Create an account to join the conversation.

  • Posts: 97
  • Thank you received: 12
I think I figured it out.
#!/bin/bash
killall /usr/bin/indiserver
exit 0
Works in the scheduler as a shutdown script. When bash closes, it gives a return code.
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB Indi server, Raspberry Pi 4B 4GB test server
Linux client
3 months 1 week ago #72435

Please Log in or Create an account to join the conversation.

  • Posts: 97
  • Thank you received: 12
Of course you don't want to kill indiserver - I just used that so I could see it working.
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB Indi server, Raspberry Pi 4B 4GB test server
Linux client
3 months 1 week ago #72442

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
Hi, this will be an unattended observatory so a manual shutdown is a no go

The killall approach will happily kill indiserver, how do I translate that to shut down though?
3 months 1 week ago #72445

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
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:

#!/bin/bash
shutdown now
exit 0
 
3 months 1 week ago #72449

Please Log in or Create an account to join the conversation.

  • Posts: 1061
  • Thank you received: 133
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….
Stellarmate OS on Raspberry pi4b
Skywatcher EQ8 pro, on steel pier
Takahashi FSQ85, FS60cb & Meade 8” SCT (de-forked)
Starlight Xpress SXVR H18, SXVR M25c, Lodestar x2 Guide Camera
Pegasus Ultimate Hub V2 for all USB & Power
Pegasus focus motors on all scopes
3 months 1 week ago #72451

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
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
3 months 1 week ago #72452

Please Log in or Create an account to join the conversation.

  • Posts: 1061
  • Thank you received: 133
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
Stellarmate OS on Raspberry pi4b
Skywatcher EQ8 pro, on steel pier
Takahashi FSQ85, FS60cb & Meade 8” SCT (de-forked)
Starlight Xpress SXVR H18, SXVR M25c, Lodestar x2 Guide Camera
Pegasus Ultimate Hub V2 for all USB & Power
Pegasus focus motors on all scopes
3 months 1 week ago #72454

Please Log in or Create an account to join the conversation.

Time to create page: 0.920 seconds