Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added --ac-only argument to start autoupdate only when device is not running on battery power #112

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

swissbuechi
Copy link
Contributor

Solves issue: #94

Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the Stale label Dec 20, 2023
@tconroy
Copy link

tconroy commented Dec 24, 2023

Not stale! This PR would be very helpful to get merged in :-)

@github-actions github-actions bot removed the Stale label Dec 24, 2023
ac_only = if args.ac_only?
<<~EOS
if [[ $(pmset -g ps | head -1) =~ "Battery Power" ]]; then
echo "Not starting autoupdate, because device is running on Battery"
Copy link
Owner

Choose a reason for hiding this comment

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

Does this print to the applet notification? Will the user be notified essentially that Autoupdate hasn't actually been run?

Copy link
Contributor Author

@swissbuechi swissbuechi Dec 29, 2023

Choose a reason for hiding this comment

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

The whole autoupdate script will not run, so no applet notification will be shown.

The users will not be notified.

Copy link
Owner

Choose a reason for hiding this comment

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

Does the autoupdate script ever start or is it essentially "stuck" until the user tries to activate it again? That's my only concern here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This time, I'm sorry for the late reply, totally missed it.

It will only run, if the user ever again plugs in power (what he's very likely to do since he want's to continue using the device) and another trigger (reboot or time) initiates the execution of the autoupdate script.

Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the Stale label Jan 20, 2024
@DomT4
Copy link
Owner

DomT4 commented Jan 20, 2024

Relax robot. Will set aside some time tomorrow to review again.

@DomT4 DomT4 removed the Stale label Jan 20, 2024
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the Stale label Feb 12, 2024
@swissbuechi
Copy link
Contributor Author

not stale

@github-actions github-actions bot removed the Stale label Feb 15, 2024
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.

3 participants