Skip to content

Commit

Permalink
reduce timeout to 15 mins
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham Pugh committed Oct 5, 2023
1 parent d3e4cb4 commit 6da7d19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ No date

- Force-close Software Settings if open after the timeout period expires.
- Update for compatibility with swiftDialog 2.3.2.
- Reduce Software Update timeout from 60 to 15 minutes.

## [2.4]

Expand Down
15 changes: 8 additions & 7 deletions nice_updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,18 @@ open_software_update() {
sleep 1
# set a maximum time that Software Update can be open before killing System Settings and invoking another dialog
((timecount++))
if [[ $timecount -ge 3600 ]]; then
if pgrep "System Settings"; then
pkill "System Settings"
elif pgrep "System Preferences"; then
pkill "System Preferences"
fi
if [[ $timecount -ge 900 ]]; then
break
fi
done
if [[ $timecount -ge 3600 ]]; then
if [[ $timecount -ge 900 ]]; then
writelog "Software Update was open too long"
write_status "Software Update was open too long"
if pgrep "System Settings"; then
pkill "System Settings"
elif pgrep "System Preferences"; then
pkill "System Preferences"
fi
else
writelog "Software Update was closed"
write_status "Software Update was closed"
Expand Down

0 comments on commit 6da7d19

Please sign in to comment.