Skip to content

Commit 62c1925

Browse files
committed
v1.1.1 Patch to fix custom Self Service brand image
* Added true/false variable for custom Self Service branding * Added loop for waiting for the custom branding to be downloaded * Removed To Do list, how to use, and tested versions from bash script * Updated GitHub Readme file with additional information
1 parent 044e5e2 commit 62c1925

File tree

2 files changed

+63
-77
lines changed

2 files changed

+63
-77
lines changed

README.md

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,48 @@
1-
# DEP Notify
2-
Template bash script to start DEP Notify and run Policies during enrollment with Jamf. App installer, source code, and documentation can be found at https://gitlab.com/Mactroll/DEPNotify
1+
# DEP Notify for Jamf Pro
2+
Template bash script to start DEP Notify and run Policies during enrollment with Jamf. App installer, source code, and documentation can be found at: https://gitlab.com/Mactroll/DEPNotify
33

44
![](https://github.com/jamfprofessionalservices/DEP-Notify/blob/master/example-img/fullscreen-mode.png)
55

6+
## How to Use
7+
8+
This script is designed to make implementation of DEP Notify very easy with limited scripting knowledge. The script has variables that may be modified to customize the end user experience. DO NOT modify things in or below the CORE LOGIC area unless major testing and validation is performed.
9+
10+
**Please note, the script is set to testing mode by default.** Having testing mode on will cause the following things to occur:
11+
* Sleep commands in place of running Policies
12+
* Removal of BOM and configuration files
13+
* Command + Control + x is set to quit or interrupt DEP Notify
14+
15+
The script will need to be changed from `TESTING_MODE=true` to `TESTING_MODE=false` for polices to run properly.
16+
17+
**It is recommended that you read the script fully and make changes that suit your organization prior to deployment to end user devices.**
18+
19+
## Overview of Jamf Pro Setup
20+
21+
While each organization will use a setup tool like DEP Notify differently, here is the most common way that it is delivered as well as how the script was designed to function. Changing the workflow should result in testing prior to production release.
22+
23+
1. Create policies in Jamf Pro to install core software during first setup. Set the frequency to ongoing and the trigger to custom and type in a manual trigger. Ex: depNotifyFirefox or installOffice201x
24+
2. Once software policies are created, customize this script with changes to verbiage as well as updating the POLICY_ARRAY with appropriate information. Double check the testing flag once you are ready to proceed.
25+
3. Upload DEP Notify.pkg (downloaded from https://gitlab.com/Mactroll/DEPNotify) and this script to Jamf Pro. Create a policy to install the PKG and this script using the Enrollment Complete trigger. Also set the execution frequency to ongoing.
26+
4. Once a computer is finished enrolling, the DEP Notify policy will start and then call the other policies in order based on the array.
27+
5. (Optional) If you are requiring FileVault encryption, the script will automatically check at the end of running policies if deferred enablement is on. This will trigger a logout instead of a quit of DEP Notify.
28+
29+
DEP Notify PKG and additional documentation can be found at: https://gitlab.com/Mactroll/DEPNotify
30+
31+
## Tested Software Versions
32+
33+
* macOS 10.4.0
34+
* macOS 10.13.6
35+
* DEPNotify 1.1.0
36+
* Jamf Pro 10.7.1
37+
638
## Change Log
739

40+
9/25/18 - Added variable and check for custom Self Service branding by Kyle Bareis
41+
* Added true/false variable for custom Self Service branding
42+
* Added loop for waiting for the custom branding to be downloaded
43+
* Removed To Do list, how to use, and tested versions from bash script
44+
* Updated GitHub Readme file with additional information
45+
846
9/24/18 - Updated loop for verifying Apple Setup Complete by Arek Dryer and Kyle Bareis
947
* Changed loop to look for the Setup Assistant process rather than files and users
1048
* Changed /dev/console lookup to stat per shellcheck.net recommendation
@@ -22,27 +60,8 @@ Template bash script to start DEP Notify and run Policies during enrollment with
2260

2361
6/28/18 - Initial commit by Kyle Bareis
2462

25-
## Tested Software Versions
26-
27-
* macOS 10.13.6 and macOS 10.4.0
28-
* DEPNotify 1.1.0
29-
* Jamf Pro 10.7.1
30-
31-
## How to Use
32-
33-
This script is designed to make implementation of DEP Notify very easy with limited scripting knowledge. The section below has variables that may be modified to customize the end user experience. DO NOT modify things in or below the CORE LOGIC area unless major testing and validation is performed.
34-
35-
The script is set to testing mode by default. Having testing mode on will cause sleep commands to be run instead of Policies from Jamf. Also, removal of BOM files that are created happen as well to reduce in troubleshooting issues. Finally, Command + Control + x is set to quit or interrupt DEP Notify for testing purposes. The script will need to be changed from `TESTING_MODE=true` to `TESTING_MODE=false` for polices to run properly.
36-
37-
## Overview of Jamf Pro Setup
38-
1. Create policies to install core software during first setup. Set the frequency to ongoing and the trigger to custom and type in a trigger. Ex: depNotifyFirefox
39-
2. Once software policies are created, customize this script with changes to verbiage as well as updating the POLICY_ARRAY with appropriate information
40-
3. Upload DEP Notify.pkg and this script to Jamf Pro. Create a policy to install the PKG and this script using the Enrollment Complete trigger. Also set the execution frequency to ongoing.
41-
4. Once a computer is finished enrolling, the DEP Notify policy will start and then call the other policies in order based on the array.
42-
43-
DEP Notify PKG and Documentation can be found at: https://gitlab.com/Mactroll/DEPNotify
44-
4563
## To Do List
4664

65+
* Add ability to have policy script parameters fill in variables
4766
* Finalize EULA process - Open issue: https://gitlab.com/Mactroll/DEPNotify/issues/19
4867
* Create generic registration module

depNotify.sh

Lines changed: 22 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -22,67 +22,15 @@
2222
# DEALINGS IN THE SOFTWARE.
2323

2424
#########################################################################################
25-
# Change Log
26-
#########################################################################################
27-
28-
# 9/24/18 - Updated loop for verifying Apple Setup Complete by Arek Dryer and Kyle Bareis
29-
# * Changed loop to look for the Setup Assistant process rather than files and users
30-
# * Changed /dev/console lookup to stat per shellcheck.net recommendation
31-
# * Verified with 10.13.6, 10.14 and Jamf Pro 10.7.1
32-
# * Removed double \\ in the new line escapes. Has changed in a recent update.
33-
# * Added a troubleshooting and debugging log for helping out with DEP related issues.
34-
# * Debug log focused on what happens prior to DEP Notify creation.
35-
# * Changed default image to Self Service icon.
36-
#
37-
# 7/13/18 - Major updates to script logic and error correction by Kyle Bareis
38-
# * updated if statements to use true/false over yes/no
39-
# * added FileVault deferred enablement check and modified to logout or continue
40-
# * added tested versions comment
41-
# * additional cleanup and error checking
42-
# 6/28/18 - Initial commit by Kyle Bareis
43-
44-
#########################################################################################
45-
# Tested Software Versions
46-
#########################################################################################
47-
48-
# macOS 10.13.6 and macOS 10.4.0
49-
# DEPNotify 1.1.0
50-
# Jamf Pro 10.7.1
51-
52-
#########################################################################################
53-
# How to Use
25+
# General Information
5426
#########################################################################################
5527

5628
# This script is designed to make implementation of DEPNotify very easy with limited
5729
# scripting knowledge. The section below has variables that may be modified to customize
5830
# the end user experience. DO NOT modify things in or below the CORE LOGIC area unless
5931
# major testing and validation is performed.
6032

61-
# The script is set to testing mode by default. Having testing mode on will cause sleep
62-
# commands to be run instead of Policies from Jamf. Also, removal of BOM files that are
63-
# created happen as well to reduce in troubleshooting issues. Finally, Command + Control
64-
# + x is set to quit or interrupt DEP Notify for testing purposes. The script will need
65-
# to be changed from `TESTING_MODE=true` to `TESTING_MODE=false` for polices to run.
66-
67-
# Overview of Jamf Pro Setup
68-
# 1. Create policies to install core software during first setup. Set the frequency to
69-
# ongoing and the trigger to custom and type in a trigger. Ex: depNotifyFirefox
70-
# 2. Once software policies are created, customize this script with changes to verbiage
71-
# as well as updating the POLICY_ARRAY with appropriate information
72-
# 3. Upload DEP Notify.pkg and this script to Jamf Pro. Create a policy to install the
73-
# PKG and this script using the Enrollment Complete trigger. Also set the
74-
# execution frequency to ongoing.
75-
# 4. Once a computer is finished enrolling, the DEP Notify policy will start and then
76-
# call the other policies in order based on the array.
77-
78-
# DEP Notify PKG and Documentation can be found at: https://gitlab.com/Mactroll/DEPNotify
79-
80-
#########################################################################################
81-
# To Do List
82-
#########################################################################################
83-
84-
# Finalize EULA process - Open issue: https://gitlab.com/Mactroll/DEPNotify/issues/19
85-
# Create generic registration module
33+
# More information at: https://github.com/jamfprofessionalservices/DEP-Notify
8634

8735
#########################################################################################
8836
# Variables to Modify
@@ -100,6 +48,10 @@
10048
# If this variable is left blank, the generic image will appear
10149
BANNER_IMAGE_PATH="/Applications/Self Service.app/Contents/Resources/AppIcon.icns"
10250

51+
# Flag for using the custom branding icon from Self Service and Jamf Pro
52+
# This will override the banner image specified above
53+
SELF_SERVICE_CUSTOM_BRANDING=false # Set variable to true or false
54+
10355
# Main heading that will be displayed under the image
10456
# If this variable is left blank, the generic banner will appear
10557
BANNER_TITLE="Welcome to Organization"
@@ -144,13 +96,13 @@
14496
#########################################################################################
14597

14698
# Variables for File Paths
147-
TMP_DEBUG_LOG="/tmp/depNotifyDebug.log"
14899
JAMF_BINARY="/usr/local/bin/jamf"
149100
FDE_SETUP_BINARY="/usr/bin/fdesetup"
150101
DEP_NOTIFY_APP="/Applications/Utilities/DEPNotify.app"
151102
DEP_NOTIFY_CONFIG="/var/tmp/depnotify.log"
152103
DEP_NOTIFY_DONE="/var/tmp/com.depnotify.provisioning.done"
153104
DEP_NOTIFY_EULA="/var/tmp/com.depnotify.agreement.done"
105+
TMP_DEBUG_LOG="/var/tmp/depNotifyDebug.log"
154106

155107
# Validating true/false flags
156108
if [ "$TESTING_MODE" != true ] && [ "$TESTING_MODE" != false ]; then
@@ -178,6 +130,21 @@
178130
CURRENT_USER=$(stat -f "%Su" "/dev/console")
179131
echo "$(date "+%a %h %d %H:%M:%S"): Current user set to $CURRENT_USER." >> "$TMP_DEBUG_LOG"
180132

133+
# If SELF_SERVICE_CUSTOM_BRANDING is set to true. Loading the updated icon
134+
if [ "$SELF_SERVICE_CUSTOM_BRANDING" = true ]; then
135+
open -a "/Applications/Self Service.app" --hide
136+
137+
# Loop waiting on the branding image to properly show in the users library
138+
CUSTOM_BRANDING_PNG="/Users/$CURRENT_USER/Library/Application Support/com.jamfsoftware.selfservice.mac/Documents/Images/brandingimage.png"
139+
until [ -f "$CUSTOM_BRANDING_PNG" ]; do
140+
echo "$(date "+%a %h %d %H:%M:%S"): Waiting for branding image from Jamf Pro." >> "$TMP_DEBUG_LOG"
141+
sleep 1
142+
done
143+
144+
# Setting Banner Image for DEP Notify to Self Service Custom Branding
145+
BANNER_IMAGE_PATH="$CUSTOM_BRANDING_PNG"
146+
fi
147+
181148
# Testing Mode Enhancements
182149
if [ "$TESTING_MODE" = true ]; then
183150
# Setting Quit Key set to command + control + x (Testing Mode Only)

0 commit comments

Comments
 (0)