diff --git a/CHANGELOG.md b/CHANGELOG.md index c688c5f..710990c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] diff --git a/nice_updater.sh b/nice_updater.sh index 2969117..18e9b8c 100755 --- a/nice_updater.sh +++ b/nice_updater.sh @@ -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"