Skip to content

Commit

Permalink
2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
grahampugh committed Apr 30, 2021
1 parent a4410f6 commit 839bee2
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 3 deletions.
74 changes: 74 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# CHANGELOG

## [Untagged]

No date

## [2.0.1]

30.04.2021

- The uninstaller script now forgets the package.
- A delay is introduced after a user closes the Software Update pane before bringing the dialog back. This is to primarily prevent the popup showing up while a restart is happening. (Ideally we would be able to check if the restart has been initiated, but that is not happening yet.)
- Added the CHANGELOG.md file.

## [2.0]

30.04.2021

This update removes the parts of the script that initiated `softwareupdate` for updates that require a restart. Instead, the Software Update pane is opened to prompt the user to perform the update themselves. If the user closes the Software Update pane, the prompt will reopen with one fewer chances to defer.

Due to this change, the on-demand logic has been removed.

## [1.8]

27.09.2019

The software updates that didn't need a restart were not running. This update fixes it.
Also, the last notification message no longer times out after 300s. It will stay open forever.

## [1.7]

27.08.2019

- Replaced StartInterval with StartCalendarInterval to ensure script starts regularly.
- Created an uninstaller script
- Created a post-install script for Jamf which will allow parameters to be overridden in a policy.

## [1.6]

15.08.2019

The deferral count will no longer reduce if there is no user response. We want to avoid a situation where an unattended machine restarts without intervention. The final alert will still timeout and perform the updates, however.

Also fixed the custom logo option.

Note that this version has the default of running every hour in `build.sh. The next version will return to once a day.

This version also includes our corporate logo.

## [1.5]

13.08.2019

A custom icon (any `.png`) can be added to a `custom_icons` folder. If so, this will be used in the `jamfHelper` message alert instead of the Software Updates icon.

The `currentUser` calculation was also changed to the `scutil` method to avoid python.

The build script no longer leaves the plists in binary format.

## [1.4]

13.08.2019

Changed the default button of the jamfHelper dialogs to Cancel, because after timeout, the update was running anyway since timeout induces whichever the default button is.

Also shortened the timeout to 82800 from 99999 seconds to prevent overlap of two days' dialogs.

[untagged]: https://github.com/grahampugh/nice-updater/compare/v2.0...HEAD
[2.0]: https://github.com/grahampugh/nice-updater/compare/1.8...v2.0
[1.8]: https://github.com/grahampugh/nice-updater/compare/1.7...1.8
[1.7]: https://github.com/grahampugh/nice-updater/compare/1.6...1.7
[1.6]: https://github.com/grahampugh/nice-updater/compare/1.5...1.6
[1.5]: https://github.com/grahampugh/nice-updater/compare/1.4...1.5
[1.4]: https://github.com/grahampugh/nice-updater/compare/1.0...1.4
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
identifier="com.github.grahampugh.nice_updater"

# Default version of the build, you can leave this alone and specify as an argument like so: ./build.sh 1.7
version="2.0"
version="2.0.1"

# The title of the message that is displayed when software updates are in progress and a user is logged in
updateRequiredTitle="macOS Software Updates Required"
Expand Down
18 changes: 18 additions & 0 deletions com.github.grahampugh.nice_updater_on_demand.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.grahampugh.nice_updater_on_demand</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Library/Scripts/nice_updater.sh</string>
<string>on_demand</string>
</array>
<key>WatchPaths</key>
<array>
<string>/Library/Preferences/com.github.grahampugh.nice_updater.trigger.plist</string>
</array>
</dict>
</plist>
1 change: 1 addition & 0 deletions nice_updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ update_check() {
alert_logic
# repeat if software update was closed
while [[ $was_closed = 1 ]]; do
random_delay
alert_logic
done
fi
Expand Down
7 changes: 7 additions & 0 deletions nice_updater_uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,11 @@ writelog "Deleting NiceUpdater files..."
[[ -e "$scriptPath" ]] && rm -f "$scriptPath"
[[ -e "$uninstallScriptPath" ]] && rm -f "$uninstallScriptPath"

writelog "Forgetting the package..."

# Find any packages and remove them
if pkgutil --pkgs=$identifier ; then
pkgutil --forget $identifier
fi

finish 0
2 changes: 0 additions & 2 deletions postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ preferenceFileFullPath="/Library/Preferences/com.github.grahampugh.nice_updater.
# Set permissions on LaunchDaemon and Script
chown root:wheel "$mainDaemonPlist"
chmod 644 "$mainDaemonPlist"
chown root:wheel "$mainOnDemandDaemonPlist"
chmod 644 "$mainOnDemandDaemonPlist"
chown root:wheel "$preferenceFileFullPath"
chmod 644 "$preferenceFileFullPath"
chown root:wheel /Library/Scripts/nice_updater.sh
Expand Down

0 comments on commit 839bee2

Please sign in to comment.