Welcome, Guest
Username: Password: Remember me
08 Apr 2018
INDI development team is happy to announce the release of INDI Library v1.7.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers.
Read More...
  • Page:
  • 1
  • 2

TOPIC: System shutdown check box in the scheduler

System shutdown check box in the scheduler 1 month 1 week ago #26057

Good evening, I want to know if someone need a "system shutdown after work" check box in the scheduler ? Is it hard work to do in Ekos development ?

Regards

Hugues MAILLET

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

Re:System shutdown check box in the scheduler 1 month 3 days ago #26173

You may achieve this feature with the "shutdown script" editbox. The intent of this box is to allow execution of arbitrary commands when the scheduler stops.

-Eric
The following user(s) said Thank You: knro, broadcastyourseb, Gilles, xsnrg

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

System shutdown check box in the scheduler 4 weeks 1 day ago #26228

Yes, as Eric says, shutdown script is the way to go.
Have a look at the last line of my shutdown script here github.com/dokeeffe/bh-observatory/blob/...schedulerShutdown.sh
The following user(s) said Thank You: Gilles

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

Celestron CPC1100 Atik 383L
HP8300 Elite i5 running Xubuntu, Indi, Kstars & Ekos
Roll off roof observatory
Battling Irish weather
github.com/dokeeffe
twitter.com/BallyhouraStars

System shutdown check box in the scheduler 4 weeks 1 day ago #26233

  • Gilles
  • Gilles's Avatar
  • Away
  • Expert Boarder
  • Expert Boarder
  • Posts: 92
  • Karma: 2
  • Thank you received: 19
Hi
Just to understand : where does this script runs ?
I mean in case of a remote server, is it able to shutdown the remote machine ?
(Hugues and I and other are trying to shutdown cleanely our RPi/Tinkerboard/... at the end of session, without ssh)
Gilles.

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

System shutdown check box in the scheduler 4 weeks 1 day ago #26236

Ahh yes I understand now. That script runs on the machine thats running kstars & EKOS. For me this is the same PC thats running the INDI server.
Without ssh then I'm not sure how you could shutdown the remote server. Maybe a cron job or something to check if any indi clients connected, and if not then shutdown?

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

Celestron CPC1100 Atik 383L
HP8300 Elite i5 running Xubuntu, Indi, Kstars & Ekos
Roll off roof observatory
Battling Irish weather
github.com/dokeeffe
twitter.com/BallyhouraStars

System shutdown check box in the scheduler 4 weeks 1 day ago #26237

You could also use INDI Watchdog driver with custom script on the remote host.

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

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

System shutdown check box in the scheduler 4 weeks 1 day ago #26238

  • Gilles
  • Gilles's Avatar
  • Away
  • Expert Boarder
  • Expert Boarder
  • Posts: 92
  • Karma: 2
  • Thank you received: 19

knro wrote: You could also use INDI Watchdog driver with custom script on the remote host.

Thank you Jasem, good idea
I will try that

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

Re:System shutdown check box in the scheduler 4 weeks 10 hours ago #26241

On my side I could not have the watchdog driver properly protect the remote installation, but I didn't involve much effort in that yet. I'd be glad if you could share information about your own configuration.

-Eric

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

Re:System shutdown check box in the scheduler 3 weeks 5 days ago #26277

Just curios, but why no ssh? If you have an ssh server running on the Pi, then you can specify the command to run on the command line to the ssh client. Something like this would be in your shutdown script:

ssh -l pi raspberrypi sudo shutdown -h now

Of course, there would be two prerequisites to get this to work. Configure sudo to allow shutdown to run without prompting for password, and use public/private key authentication for ssh, so ssh doesn't prompt for a password.

If you're on Windows, the Putty package has a command line client called plink that can be used in place of the ssh command above. The arguments are a little different, though.

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

Re:System shutdown check box in the scheduler 3 weeks 5 days ago #26279

Indeed ssh is a viable solution. Idea was that both the shutdown script on Ekos side and the Watchdog script on INDI Remote side were fit for the job.

I'd suggest against sudo though, prefer adding your ssh user to a group that is authorized to shutdown the remote computer.

-Eric

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

System shutdown check box in the scheduler 3 weeks 5 days ago #26280

  • Gilles
  • Gilles's Avatar
  • Away
  • Expert Boarder
  • Expert Boarder
  • Posts: 92
  • Karma: 2
  • Thank you received: 19
Well, of course...
This question is also to take care of end user, some of them don't like our geek command line, as they say :)

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

Re:System shutdown check box in the scheduler 3 weeks 5 days ago #26281

Ah yes, agreed. But in that case, I assume the setup would be different, and include an all-in-one remote server that itself provides this capability out-of-the box, and documentation to use it.

Should we default the scheduler to use example startup and shutdown scripts, with commented out features showing how to implement things in various situations?

-Eric

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

  • Page:
  • 1
  • 2
Time to create page: 0.191 seconds

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!


Gallery

Replica

Why INDI

Replica