Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR creates scripts/reload.sh which sends a SIGUSR1 signal to the children of the "allsky.sh" program, which will usually be the capture or capture_RPiHQ command. They then display an "Allsky is restarting" message, then exit, which causes the service to be restarted. This is nicer and more informative than having an "Allsky is not running" message followed by "Allsky is starting".
The modified "allsky.service" file calls reload.sh when
sudo systemctl reload allsky
is executed.A future PR will have the WebUI invoke reload when settings change, rather than doing a "restart", which causes the two messages to be displayed. Unfortunately the version of systemctl that comes with Buster doesn't support sending a different signal when "status" is executed. If it did, reload.sh wouldn't be needed (although the updated "allsky.service" file would be).