• This repository has been archived on 08/Feb/2023
  • Stars
    star
    215
  • Rank 180,342 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tool to help users with pre-existing devices upgrade their OS version.

Nudge-Python (macadmin's Slack #nudge)

Nudge-Python is now considered End Of Life (EOL) as of February 11th, 2021. The last official version is 2.0.1 which enabled Big Sur support through the use of macadmins/python 3.9.1

If you are using a fork of Nudge-Python (a well known one is located here), support will not be offered unless the developer of the fork decides to continue support.

While Nudge-Python does support Big Sur, it is recommended to use the new version of Nudge, based on SwiftUI 5.2. You can find that project here.

On March 1st, 2021, this project will be marked as archived through GitHub.

Nudge functionality overview

  • Nudge, rather than trying to install updates, merely prompts users to install updates via an approved method (System Preferences, Munki, Jamf, etc.).
  • By default, Nudge will open every 30 minutes, at the 0 and 30 minute mark. This is because of the default launch agent. If you find this behavior too aggressive, please change the launch agent.
  • The timers are for if the user minimizes/hides the window. It will re-load the window into the foreground, taking precedence over any window.
  • Read Alan Siu's Introduction to Nudge blog post for a more in-depth introduction to Nudge.

Macadmins Python

As of v2.0.1, Nudge now requires macadmins/python 3.9.1. 3.9.1 is backwards compatible with 10.9.5 through Big Sur 11.0

Gurl has been updated from the Munki 4.0 release.

Nibbler has been updated to support python 3.

Important Information

You most certainly want to customize the following values:

  • cut_off_date
  • main_subtitle_text
  • more_info_url
  • minimum_os_version
  • minimum_os_sub_build_version

Also, you will at the very least want to change the company_logo.png

Screenshots

Screenshot Nudge

Building this package

You will need to use munki-pkg to build this package.

** This is not to be confused with munki.** Munki-Pkg is a standalone project that works with all macOS tooling and MDMs

Credits

This tool would not be possible without nibbler, written by Michael Lynn.

Notes

Because of the way git works, nudge will not contain the Logs folder required for the postinstall to complete.

In order to create a properly working package, you will need to run the following command before building the package: munkipkg --sync /path/to/cloned_repo/nudge.

OS Support v1

The following operating system and versions have been tested.

  • 10.10.0, 10.10.5
  • 10.11.0, 10.11.6
  • 10.12.0, 10.12.6
  • 10.13.0 10.13.3, 10.13.6
  • 10.14 -> 10.14.6
  • 10.15 -> 10.15.1

OS Support v2 (macadmins python)

The following operating system and versions have been tested with the embedded python.

  • 10.14
  • 10.15
  • 11

Configuration File

Essentially every component of the UI is customizable, all through a JSON configuration file. An example file is available within the code repository.

Defined config file

To define a configuration file, use the jsonurl script parameter.

--jsonurl=https://fake.domain.com/path/to/config.json
--jsonurl=file:///path/to/local/config.json

Default config file

If you prefer to deploy the configuration file to each client, it needs to be placed in the Resources directory and named nudge.json. If this file exists, jsonurl does not need to be set.

Preferences

A description of each preference is listed below.

Cutoff date

Cut off date in UTC.

"cut_off_date": "2018-12-31-00:00"

Cut off date warning

This is the number, in days, of when to start the initial UI warning. When this set of days passes, the user will be required to hit the I Understand button, followed by the Close button to exit out of the UI.

"cut_off_date_warning": 14

Logo path

A custom logo path. Alternatively, just replace the included company_logo.png.

"logo_path": "/Some/Custom/Path/company_logo.png"

Button Title text

This is the first set of text above the Update Machine button.

"button_title_text": "Ready to start the update?"

Button Sub-title text

This is the second set of text above the Update Machine button.

"button_sub_titletext": "Click on the button below."

Dismissal Count Threshold

This is the amount of times a user can disregard nudge before more aggressive behaviors kick in.

"dismissal_count_threshold": 100

URL for self-servicing upgrade app

This is the full URL for a local self-servicing app such as Jamf Self Service or Munki Managed Software Center linking directly to a Jamf policy or Munki catalog item to install a major version upgrade.

This is useful in situations where users do not have administrative privileges and cannot run Install macOS...app directly. This option has no effect on minor version updates – only full version OS upgrades.

Provide a full URL with the correct protocol for your self-servicing app.

  • Open Jamf Self Service to main page: jamfselfservice://content
  • Open Jamf Self Service to view a policy by ID number: jamfselfservice://content?entity=policy&id=<id>&action=view
  • Open Jamf Self Service to execute a policy by ID number: jamfselfservice://content?entity=policy&id=<id>&action=execute
  • Open Manage Software Center to the detail page for an item: munki://detail-<item name>
"local_url_for_upgrade": "jamfselfservice://content?entity=policy&id=<id>&action=view"

Note: If local_url_for_upgrade is provided, path_to_app is ignored in the configuration file.

Minimum OS Version

This is the minimum OS version a machine must be on to not receive this UI.

"minimum_os_version": "10.13.6"

Minimum OS Sub Version

This is the minimum OS version a machine must be on to not receive this UI.

"minimum_os_sub_build_version": "18G103"

More info URL

This is the URL to open when the More Info button is clicked.

"more_info_url": "https://google.com"

Main Title text

This is the main, bolded text at the very top.

"main_title_text": "macOS Update"

Main Sub-title text

This is the text right under the main title.

"main_subtitle_text": "A friendly reminder from your local IT team"

Paragraph Title text

This is the bolded portion of the UI towards the top.

"paragraph_title_text": "A security update is required on your machine."

Paragraph 1 text

This is the text for the first paragraph.

"paragraph1_text": "A fully up-to-date device is required to ensure that IT can your accurately protect your computer."

Paragraph 2 text

This is the text for the second paragraph.

"paragraph2_text": "If you do not update your computer, you may lose access to some items necessary for your day-to-day tasks."

Paragraph 3 text

This is the text for the third paragraph.

"paragraph3_text": "To begin the update, simply click on the button below and follow the provided steps."

Path to app

This is the path to the macOS installer application.

"path_to_app": "/Applications/Install macOS High Sierra.app"

Note: This setting is ignored when local_url_for_upgrade is provided.

Days Between Notifications

Instead of having the Nudge GUI appear every half hour, make sure there is at least this many days between notifications. Note: if you set this to something other than 0, it may not be evaluated in full 24-hour increments. For example, if the Nudge GUI appeared on Monday in the afternoon, it may appear Tuesday morning.

"days_between_notifications": 0

No timer

Do not attempt to restore the nudge GUI to the front of a user's window.

"no_timer": false

Timer Initial

The time, in seconds, to restore the nudge GUI to the front of a user's window. This will occur indefinitely until the UI is closed or macOS update is installed.

This is when the update cutoff is over three days.

"timer_initial": 14400

Timer Day 3

The time, in seconds, to restore the nudge GUI to the front of a user's window. This will occur indefinitely until the UI is closed or macOS update is installed.

This is when the update cutoff is three days or less.

"timer_day_3": 7200

Timer Day 1

The time, in seconds, to restore the nudge GUI to the front of a user's window. This will occur indefinitely until the UI is closed or macOS update is installed.

This is when the update cutoff is one day or less.

"timer_day_1": 600

Timer Final

The time, in seconds, to restore the nudge GUI to the front of a user's window. This will occur indefinitely until the UI is closed or macOS update is installed.

This is when the update is one hour or less.

"timer_final": 60

Timer Elapsed

The time, in seconds, to restore the nudge GUI to the front of a user's window. This will occur indefinitely until the UI is closed or macOS update is installed.

This is when the update cutoff has elapsed.

"timer_elapsed": 10

Update screenshot path

A custom update screenshot path. Alternatively, just replace the included update_ss.png.

"screenshot_path": "/Some/Custom/Path/update_ss.png"

Random Delay

Randomize the UI popup by up to 20 minutes.

"random_delay": true

Update Minor

Perform Apple Software Updates.

"update_minor": true

Update Minor Days

Grace period before UI pops up to prompt for minor updates.

"update_minor_days": 14

More Repositories

1

nudge

A tool for encouraging the installation of macOS security updates.
Swift
976
star
2

SplashBuddy

Onboarding splash screen for MDM and Automated Device Enrollment.
Swift
404
star
3

installapplications

A tool for dynamically using installapplication
Python
283
star
4

umad

A tool to help users with pre-existing devices enroll into MDM
Python
275
star
5

python

Framework files for use with popular python macadmin toolsets
Shell
223
star
6

escrow-buddy

A macOS authorization plugin that helps MDM administrators ensure valid FileVault keys are escrowed for all their Macs.
Objective-C
178
star
7

outset

Automatically process packages and scripts during boot, login, or on demand.
Swift
131
star
8

sofa

SOFA | A MacAdmin's Simple Organized Feed for Apple Software Updates
HTML
87
star
9

osquery-extension

An osquery extension for endpoint engineers
Go
87
star
10

nibbler

python pyobjc utility for macOS for displaying dialogs using .nib files
Python
82
star
11

SupportCompanion

macOS helper application designed to empower end-users
C#
41
star
12

jamf-pro-sdk-python

A client library for the Jamf Pro APIs and webhooks.
Python
40
star
13

sashay

DEPRECATED - Scrape caching server logs and send periodic reports
Python
37
star
14

munki-builds

22
star
15

docker-mwa2

Python
22
star
16

apple-status-api

Publish Apple service status notifications as a simple REST API
Python
20
star
17

dockset

It's like outset, but for your Dock
Python
17
star
18

macadmins.io

14
star
19

puppet-apple_package

Ruby
12
star
20

chef-cookbooks

Metarepo for all known macOS related Chef Cookbook repos
11
star
21

unfs3

Docker image for running unfs3, a user space NFS server
Shell
10
star
22

munkireport-php

Docker autobuild repo for Munkireport-PHP
PHP
10
star
23

puppet-macauthdb

Manage the OS X authorization database with puppet.
Ruby
9
star
24

postgres

Docker container for postgres that accepts remote connections from Docker IPs
Shell
9
star
25

ddm_examples

Examples of DDM on macOS for use with kmfddm
Makefile
8
star
26

puppet-xcode_tools

Puppet module to install the Xcode CLI Tools
Ruby
7
star
27

netboot-httpd

Docker container for serving netboot image over http. Use in combination with BSDPy
Nginx
7
star
28

puppet-launchd

Puppet
5
star
29

puppet-client_stdlib

Ruby
4
star
30

puppet-remotemanagement

Ruby
4
star
31

puppet-authpluginmech

A method of managing mechanisms for authorization plugins
Ruby
3
star
32

crypt-server-ldap

Python
3
star
33

puppet-sal_client

Configuration of a Sal client using Puppet
Puppet
2
star
34

docker-makecatalogs

Docker image that will run makecatalogs
Shell
2
star
35

whd

Docker container for WebHelpDesk
Shell
2
star
36

ddm_testing

Repo for working with MAOS-hosted test servers
2
star
37

ddm_infra

Example Repo for setting up a nanoMDM + kmfddm server.
Shell
1
star
38

macnamer

Docker image for Macnamer
Python
1
star
39

salWHD

Docker container for sal + Sal-WHDImport + JSSImport
Shell
1
star
40

puppet-gatekeeper

enables gatekeeper.
Ruby
1
star