Skip to content

Update MerlinAU.sh#77

Merged
ExtremeFiretop merged 2 commits intoExtremeFiretop:devfrom
Martinski4GitHub:dev
Jan 21, 2024
Merged

Update MerlinAU.sh#77
ExtremeFiretop merged 2 commits intoExtremeFiretop:devfrom
Martinski4GitHub:dev

Conversation

@Martinski4GitHub
Copy link
Collaborator

Added code to run a check & see if a new F/W update is available. This is done ONLY if the user has enabled F/W Update Checks; otherwise, we have to respect the user's selection not to check.

Added code to run a check & see if a new F/W update is available. This is done ONLY if the user has enabled F/W Update Checks; otherwise, we have to respect the user's selection not to check.
@ExtremeFiretop
Copy link
Owner

ExtremeFiretop commented Jan 21, 2024

Crap. I merged directly to the dev branch instead of making a new one..

Well look at this, while I roll back lol!: af3bd4c

@ExtremeFiretop
Copy link
Owner

Okay. Sorry about that, rolled back the changes to dev, let me make a new branch this time lol!

@ExtremeFiretop
Copy link
Owner

Made a new branch and PR so we can compare properly.

@ExtremeFiretop
Copy link
Owner

ExtremeFiretop commented Jan 21, 2024

Okay so I see, you just threw it in the cron check at the start of the script. While I specifically put it past the disabled check of the run now function.

Difference is yours would run at the start of the script everytime if the update is enabled, while mine would only run if the update is enabled and the user selects to check for updates, not at the start of every script run.

I wanted this to be interactive only since if it was a cron job I would let it rely on the automatic watchdog at 2AM.
However reviewing your suggestion, I kinda like the idea of checking everytime our script runs, basically you end up with having the watchdog that checks at 2AM every morning, and our check which checks whenever the cron is run. ( as configured by the user.), lets say 12AM by default)

Any thoughts?

Added code to make sure we honor the user selection when choosing to disable F/W Update Checks.
@Martinski4GitHub
Copy link
Collaborator Author

Martinski4GitHub commented Jan 21, 2024

Okay so I see, you just threw it in the cron check at the start of the script. While I specifically put it past the disabled check of the run now function.

Difference is yours would run at the start of the script everytime if the update is enabled, while mine would only run if the update is enabled and the user selects to check for updates, not at the start of every script run.

I wanted this to be interactive only since if it was a cron job I would let it rely on the automatic watchdog at 2AM. However reviewing your suggestion, I kinda like the idea of checking everytime our script runs, basically you end up with having the watchdog that checks at 2AM every morning, and our check which checks whenever the cron is run. ( as configured by the user.), lets say 12AM by default)

Any thoughts?

Yeah, I put the call at the start of the script to run every time because I thought that it wouldn't hurt to do it based on when the script runs (i.e. manual run or based on the cron schedule) since the user has control over that versus the F/W schedule that runs around 2am. This way, if there's a new F/W Update the day before, the user doesn't have to wait until the following morning at 2am; instead during a manual run or the the cron job running at, say, 12am would catch the new F/W version available.

P.S. Just updated PR #77 with an improvement to make sure we honor the user's selection.

@ExtremeFiretop
Copy link
Owner

Okay so I see, you just threw it in the cron check at the start of the script. While I specifically put it past the disabled check of the run now function.
Difference is yours would run at the start of the script everytime if the update is enabled, while mine would only run if the update is enabled and the user selects to check for updates, not at the start of every script run.
I wanted this to be interactive only since if it was a cron job I would let it rely on the automatic watchdog at 2AM. However reviewing your suggestion, I kinda like the idea of checking everytime our script runs, basically you end up with having the watchdog that checks at 2AM every morning, and our check which checks whenever the cron is run. ( as configured by the user.), lets say 12AM by default)
Any thoughts?

Yeah, I put the call at the start of the script to run every time because I thought that it wouldn't hurt to do it based on when the script runs (i.e. manual run or based on the cron schedule) since the user has control over that versus the F/W schedule that runs around 2am. This way, if there's a new F/W Update the day before, the user doesn't have to wait until the following morning at 2am; instead during a manual run or the the cron job running at, say, 12am would catch the new F/W version available.

P.S. Just updated PR #77 with an improvement to make sure we honor the user's selection.

Agreed.

I like the idea of kinda "adding" a update check the user has control over, since the 2am watchdog the user cannot control.

What I was doing was kinda trying to "play nice" side by side with the 2am watchdog. But this is more control by adding an additional watchdog the user controls .

For an update script that's a better implementation. I'll merge yours in now and adjust my PR.

@ExtremeFiretop ExtremeFiretop merged commit d2906d4 into ExtremeFiretop:dev Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants