×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

System shutdown check box in the scheduler

  • Posts: 456
  • Thank you received: 76
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?
5 years 10 months ago #26236

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

You could also use INDI Watchdog driver with custom script on the remote host.
5 years 10 months ago #26237

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

  • Posts: 167
  • Thank you received: 54
Thank you Jasem, good idea
I will try that
5 years 10 months ago #26238

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

  • Posts: 1029
  • Thank you received: 301
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
5 years 10 months ago #26241

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

  • Posts: 421
  • Thank you received: 102
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.
5 years 10 months ago #26277

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

  • Posts: 1029
  • Thank you received: 301
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
5 years 10 months ago #26279

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

  • Posts: 167
  • Thank you received: 54
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 :)
5 years 10 months ago #26280

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

  • Posts: 1029
  • Thank you received: 301
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
5 years 10 months ago #26281

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

  • Posts: 167
  • Thank you received: 54
We have a growing community here in France, around Tinkerboard, with a lot of documentation for beginners.
There is a web server on it to set and update date & time.
@patdut added a shutdown and reboot button, wich is very convenient.
But there might be some other places to do that.

Btw : i've been playing around with watchdog drivet, i must say i don't understand the xay it should be used...
The following user(s) said Thank You: Eric
5 years 10 months ago #26283

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

  • Posts: 1029
  • Thank you received: 301
@Gilles Would you care adding links to the documentation providing information on how to shutdown or reboot the Tinkerboard, per @patdut implementation?

-Eric
5 years 10 months ago #26285

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

  • Posts: 167
  • Thank you received: 54
I've just asked him to answer
5 years 10 months ago #26287

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

  • Posts: 455
  • Thank you received: 51
Hello all,
To answer your question @TallFurryMan I just created a little nginx server on the tinkerboard that listen on the 80 port.
I set 3 scripts in the www folder of the user, one is a js that gets the date and time from the client side to set the date and time of the remote device and capture actions like shutdown and reboot. This js file call 2 php script that belong to the www-data user who is allowed to do do date, shutdown and reboot actions in a sudoers file.
Thats all.
@Jasem, I wonder if this could be an extension to the Indi Web Manager ?
The following user(s) said Thank You: gehelem, Eric
Last edit: 5 years 10 months ago by Patrick.
5 years 10 months ago #26289

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

Time to create page: 0.513 seconds