Skip to content

Conversation

@efournie
Copy link

I had several times Kstars crashing during the night so I wrote a small bash script monitoring and restarting it if needed.
Ekos is also automatically restarted with the default profile and if a scheduler job file named default.esl is present in the astronaut home directory (can be a link to a file somewhere else), it will automatically be (re-)started.
The script can also be started when Kstars is already running.
I still haven't figured out why Kstars crashed but it may be due to the target moving behind obstacles, not sure though.

@MattBlack85
Copy link
Collaborator

Hi @efournie and thanks for the contribution. This looks very cool, do you mind if I re-use the idea directly in https://github.com/MattBlack85/astro_monitor ?

The change you are providing has been long requested by users and I think they will love it

@efournie
Copy link
Author

efournie commented Dec 11, 2025 via email

- `astro-rollback-full` => rollback automatically indi and kstars to the previous version
- `use-astro-bleeding-edge` => install bleeding edge packages for Kstars and INDI
- `use-astro-stable` => install stable packages for Kstars and INDI
- `kstars-watchdog` => starts Kstars and Ekos with the default profile. If the program is closed or crashes, it will restart automatically. If an ekos job file named default.esl is present in the home dir, it will automatically be started.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@efournie there is only a small gotcha, these commands are listed here cause they are found within zshrc so users can invoke them directly in the terminal. We may need to alias that command in zshrc to invoke your bash script

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am currently trying to port it to python, will probably be much more flexible and make further development easier:
https://github.com/efournie/kstars-watchdog
It's not working 100% yet but should be soon

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The python version seems to work now, use or adapt whichever one you prefer!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you comfortable packaging python stuff? Ideally if you drop a setup.py I can package this directly for archlinux

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, sounds good! I will try to package it, never done it before but it should not be too complicated, especially with a single dependency.
I will first try to let it run one or two nights in order to check for unforeseen problems, just have to wait for a clear now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants