From b7df036a8ac8e2f3ca9fd43ba4b9795e8472c4cc Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 21 Jan 2024 12:42:51 -0800
Subject: [PATCH 01/25] Added subtitle support
---
Baseline v2.1beta1 Release Notes.md | 9 +++
Baseline.sh | 12 +++-
.../Baseline-v2.1-TestSubtitles.plist | 66 +++++++++++++++++++
3 files changed, 85 insertions(+), 2 deletions(-)
create mode 100644 Baseline v2.1beta1 Release Notes.md
create mode 100644 ExampleConfigurationFiles/Baseline-v2.1-TestSubtitles.plist
diff --git a/Baseline v2.1beta1 Release Notes.md b/Baseline v2.1beta1 Release Notes.md
new file mode 100644
index 0000000..f54d5dc
--- /dev/null
+++ b/Baseline v2.1beta1 Release Notes.md
@@ -0,0 +1,9 @@
+# Baseline v2.1beta1
+- New Configuration Key: `Subtitle`
+ - Added support for the new subtitle feature in SwiftDialog 2.4. (#^^^ LINK HERE ^^^#)
+
+
+
+
+# Additional Goals
+- Move more features over to the json file, that way we don't run into shell length issues if someone puts a long `--message` or `--infobox` string
diff --git a/Baseline.sh b/Baseline.sh
index 4e6ddd5..5d84d10 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -6,7 +6,7 @@ set -x
# @BigMacAdmin on the MacAdmins Slack
# trevor@secondsonconsulting.com
-scriptVersion="v.2.0"
+scriptVersion="v.2.1beta1"
########################################################################################################
########################################################################################################
@@ -559,9 +559,17 @@ function build_dialog_array()
currentIconPath=""
fi
+ #Get the desired subtitle if populated in the configuration profile
+ if $pBuddy -c "Print :$configKey:${index}:Subtitle" "$BaselineConfig" > /dev/null 2>&1; then
+ currentSubtitle=$($pBuddy -c "Print :$configKey:${index}:Subtitle" "$BaselineConfig")
+ else
+ #If no icon key is set, ensure it's blank
+ currentSubtitle=""
+ fi
+
#Generate JSON entry for item
#NOTE: We will strip out the final comma later to ensure a valid JSON
- dialogListJson+="{\"title\" : \"$currentDisplayName\", \"icon\" : \"$currentIconPath\", \"status\" : \"\"},"
+ dialogListJson+="{\"title\" : \"$currentDisplayName\",\"subtitle\" : \"$currentSubtitle\", \"icon\" : \"$currentIconPath\", \"status\" : \"\"},"
#Done looping. Increase our array value and loop again.
index=$((index+1))
diff --git a/ExampleConfigurationFiles/Baseline-v2.1-TestSubtitles.plist b/ExampleConfigurationFiles/Baseline-v2.1-TestSubtitles.plist
new file mode 100644
index 0000000..b12858a
--- /dev/null
+++ b/ExampleConfigurationFiles/Baseline-v2.1-TestSubtitles.plist
@@ -0,0 +1,66 @@
+
+
+
+
+ BlurScreen
+
+ CleanupAfterUse
+
+ DialogListOptions
+ --infobox wtf yo wtf wtf wtf --title "Baseline v2.1beta1 Test" --message "Bart keeps adding awesome features..." --ontop --moveable --overlayicon "/Users/bigmacadmin/Pictures/Profile Pics/BigMacAdmin_Circle.png"
+ Installomator
+
+
+ DisplayName
+ Obsidian
+ Icon
+ /Applications/Obsidian.app
+ Label
+ obsidian
+ Subtitle
+ An awesome note taking app.
+
+
+ DisplayName
+ iMazing Profile Editor
+ Icon
+ /Applications/iMazing Profile Editor.app
+ Label
+ imazingprofileeditor
+ Subtitle
+ An awesome tool to make your Baseline profile (and lots more).
+
+
+ Scripts
+
+
+ DisplayName
+ Test Script
+ Icon
+ SF=bed.double.circle,color=purple
+ ScriptPath
+ /bin/sleep
+ Arguments
+ 3
+ Subtitle
+ A script that just sleeps for a while, lets see how SF Symbols look as well as super duper way long descriptions and maybe formatting, because you just **know** that someone is going to write a description this long and then ask why it doesn't show up, thats just how things go.
+
+
+ DisplayName
+ No Description
+ Icon
+ SF=bed.double.circle,color=green
+ ScriptPath
+ /bin/sleep
+ Arguments
+ 3
+
+
+ InstallomatorSwiftDialogIntegration
+
+ ReinstallDialog
+
+ Restart
+
+
+
From c284c8d60d684faeb2cdc991947e98e341520348 Mon Sep 17 00:00:00 2001
From: sjurlohne <57708526+sjurlohne@users.noreply.github.com>
Date: Tue, 30 Jan 2024 12:50:10 +0100
Subject: [PATCH 02/25] Function for silentMode variable
---
Baseline.sh | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Baseline.sh b/Baseline.sh
index 4e6ddd5..6366f74 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -1203,6 +1203,24 @@ function update_tracker(){
fi
}
+function check_silent_option()
+{
+ silentModeEnabled=$($pBuddy -c "Print :SilentMode" "$BaselineConfig" 2> /dev/null )
+
+ if [ -z $silentModeEnabled ]; then
+ log_message "No SilentMode key in configuration file"
+ silentModeEnabled="false"
+ elif [[ "$silentModeEnabled" == "true" ]]; then
+ log_message "SilentMode set to true from configuration file"
+ silentModeEnabled=true
+ elif [[ "$silentModeEnabled" == "false" ]]; then
+ log_message "SilentMode set to false from configuration file"
+ silentModeEnabled="false"
+ else
+ log_message "Invalid value for SilentMode key. Setting to default. Invalid Key Value: $silentModeEnabled"
+ silentModeEnabled="false"
+ fi
+}
########################################################################################################
########################################################################################################
From 29058a6055a0a91cba143b485cc121c36fe79344 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Thu, 1 Feb 2024 11:46:47 -0800
Subject: [PATCH 03/25] Update Baseline.sh
---
Baseline.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Baseline.sh b/Baseline.sh
index 6366f74..e81aeab 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -6,7 +6,7 @@ set -x
# @BigMacAdmin on the MacAdmins Slack
# trevor@secondsonconsulting.com
-scriptVersion="v.2.0"
+scriptVersion="v.2.1-SilentModeConfig"
########################################################################################################
########################################################################################################
@@ -1260,7 +1260,8 @@ initiate_report
# Process Script Arguments #
#################################
-silentModeEnabled=false
+check_silent_option
+
configFromArgument=false
useTracker=false
From a65de5b3bcb26b7c740184922db3359d9a43832a Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Thu, 1 Feb 2024 12:12:24 -0800
Subject: [PATCH 04/25] Update Baseline.sh
---
Baseline.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Baseline.sh b/Baseline.sh
index e81aeab..6689244 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -6,7 +6,7 @@ set -x
# @BigMacAdmin on the MacAdmins Slack
# trevor@secondsonconsulting.com
-scriptVersion="v.2.1-SilentModeConfig"
+scriptVersion="dev"
########################################################################################################
########################################################################################################
From 0492e3dcede186d58ac4e4c1c09ef5f3abeb10b5 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Tue, 6 Feb 2024 10:11:50 -0800
Subject: [PATCH 05/25] Update Baseline.sh
---
Baseline.sh | 103 ++++++++++++++++++++++++++++------------------------
1 file changed, 56 insertions(+), 47 deletions(-)
diff --git a/Baseline.sh b/Baseline.sh
index 6689244..c8ff31e 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -6,7 +6,7 @@ set -x
# @BigMacAdmin on the MacAdmins Slack
# trevor@secondsonconsulting.com
-scriptVersion="dev"
+scriptVersion="dev-fixsilentmode"
########################################################################################################
########################################################################################################
@@ -1205,7 +1205,11 @@ function update_tracker(){
function check_silent_option()
{
- silentModeEnabled=$($pBuddy -c "Print :SilentMode" "$BaselineConfig" 2> /dev/null )
+ # If silentMode hasn't been set yet, check if its in our configuration file.
+ if [ -z "$silentModeEnabled" ]; then
+ # This will exit empty if the key does not exist.
+ silentModeEnabled=$($pBuddy -c "Print :SilentMode" "$BaselineConfig" 2> /dev/null )
+ fi
if [ -z $silentModeEnabled ]; then
log_message "No SilentMode key in configuration file"
@@ -1220,6 +1224,55 @@ function check_silent_option()
log_message "Invalid value for SilentMode key. Setting to default. Invalid Key Value: $silentModeEnabled"
silentModeEnabled="false"
fi
+
+ configure_silent_mode
+}
+
+configure_silent_mode(){
+ # If silentMode is enabled, rewrite all functions which use SwiftDialog to `true`
+ # This effectively takes SwiftDialog entirely out of use.
+ if $silentModeEnabled; then
+
+ dialogPath=true
+ dialogAppPath="/System/Applications"
+
+ function dialog_command(){
+ true
+ }
+
+ function install_dialog(){
+ true
+ }
+
+ function wait_for_user(){
+ true
+ }
+
+ function build_dialog_json_file(){
+ true
+ }
+
+ function build_dialog_list_options(){
+ true
+ }
+
+ function increment_progress_bar(){
+ true
+ }
+
+ function set_progressbar_text(){
+ true
+ }
+
+ function present_failure_window(){
+ true
+ }
+
+ function present_success_window(){
+ true
+ }
+
+ fi
}
########################################################################################################
@@ -1260,8 +1313,6 @@ initiate_report
# Process Script Arguments #
#################################
-check_silent_option
-
configFromArgument=false
useTracker=false
@@ -1303,54 +1354,13 @@ done
# De-Configure Functions and Variables for Silent Mode #
############################################################
-if $silentModeEnabled; then
-
- dialogPath=true
- dialogAppPath="/System/Applications"
-
- function dialog_command(){
- true
- }
-
- function install_dialog(){
- true
- }
-
- function wait_for_user(){
- true
- }
-
- function build_dialog_json_file(){
- true
- }
-
- function build_dialog_list_options(){
- true
- }
-
- function increment_progress_bar(){
- true
- }
-
- function set_progressbar_text(){
- true
- }
-
- function present_failure_window(){
- true
- }
-
- function present_success_window(){
- true
- }
-
-fi
#############################################
# Verify a Configuration File is in Place #
#############################################
verify_configuration_file
+check_silent_option
initiate_tracker_file
#############################################
@@ -1557,7 +1567,6 @@ if [ "$progressBarDisplayNames" = "true" ]; then
configure_dialog_list_arguments "--progresstext" ' '
fi
-
#########################################
# Configure Success Customizations #
#########################################
From 40b94f836d584bdac1e15a127ad8cc9d87cab9ec Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 19:14:16 -0800
Subject: [PATCH 06/25] Fixes argument parsing when run via Jamf
---
Baseline.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Baseline.sh b/Baseline.sh
index 4e6ddd5..08f26c7 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -6,7 +6,7 @@ set -x
# @BigMacAdmin on the MacAdmins Slack
# trevor@secondsonconsulting.com
-scriptVersion="v.2.0"
+scriptVersion="v.2.0.1"
########################################################################################################
########################################################################################################
@@ -1252,6 +1252,10 @@ fi
while [ ! -z "$1" ]; do
case $1 in;
+ "/")
+ log_message "Shifting arguments for Jamf"
+ shift 2
+ ;;
-c|--config|--configuration)
shift
if [ -e "$1" ] && $pBuddy -c "Print" "${1}" > /dev/null 2>&1; then
From fad6daf8583d9557b8bea2b1e2cb421ad49fa33b Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 20:58:20 -0800
Subject: [PATCH 07/25] Update Baseline.sh
---
Baseline.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Baseline.sh b/Baseline.sh
index c8ff31e..aba3bc6 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -6,7 +6,7 @@ set -x
# @BigMacAdmin on the MacAdmins Slack
# trevor@secondsonconsulting.com
-scriptVersion="dev-fixsilentmode"
+scriptVersion="dev"
########################################################################################################
########################################################################################################
From aa0aa8f9b25ba7f656c3d6a1cddb23d21915dc28 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 21:03:56 -0800
Subject: [PATCH 08/25] Delete Baseline-v2.1-TestSubtitles.plist
---
.../Baseline-v2.1-TestSubtitles.plist | 66 -------------------
1 file changed, 66 deletions(-)
delete mode 100644 ExampleConfigurationFiles/Baseline-v2.1-TestSubtitles.plist
diff --git a/ExampleConfigurationFiles/Baseline-v2.1-TestSubtitles.plist b/ExampleConfigurationFiles/Baseline-v2.1-TestSubtitles.plist
deleted file mode 100644
index b12858a..0000000
--- a/ExampleConfigurationFiles/Baseline-v2.1-TestSubtitles.plist
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
- BlurScreen
-
- CleanupAfterUse
-
- DialogListOptions
- --infobox wtf yo wtf wtf wtf --title "Baseline v2.1beta1 Test" --message "Bart keeps adding awesome features..." --ontop --moveable --overlayicon "/Users/bigmacadmin/Pictures/Profile Pics/BigMacAdmin_Circle.png"
- Installomator
-
-
- DisplayName
- Obsidian
- Icon
- /Applications/Obsidian.app
- Label
- obsidian
- Subtitle
- An awesome note taking app.
-
-
- DisplayName
- iMazing Profile Editor
- Icon
- /Applications/iMazing Profile Editor.app
- Label
- imazingprofileeditor
- Subtitle
- An awesome tool to make your Baseline profile (and lots more).
-
-
- Scripts
-
-
- DisplayName
- Test Script
- Icon
- SF=bed.double.circle,color=purple
- ScriptPath
- /bin/sleep
- Arguments
- 3
- Subtitle
- A script that just sleeps for a while, lets see how SF Symbols look as well as super duper way long descriptions and maybe formatting, because you just **know** that someone is going to write a description this long and then ask why it doesn't show up, thats just how things go.
-
-
- DisplayName
- No Description
- Icon
- SF=bed.double.circle,color=green
- ScriptPath
- /bin/sleep
- Arguments
- 3
-
-
- InstallomatorSwiftDialogIntegration
-
- ReinstallDialog
-
- Restart
-
-
-
From 1c5926d866e91b758480b534e5ab12e409e70828 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 21:18:48 -0800
Subject: [PATCH 09/25] Housekeeping
---
Baseline.sh | 116 ++++++++++++++++++++--------------------------------
1 file changed, 44 insertions(+), 72 deletions(-)
diff --git a/Baseline.sh b/Baseline.sh
index aba3bc6..ac4dba0 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -63,8 +63,7 @@ chmod -R 655 "${BaselineTempDir}"
# Logging and Housekeeping #
#################################
-function check_root()
-{
+function check_root(){
# check we are running as root
if [[ $(id -u) -ne 0 ]]; then
@@ -75,8 +74,7 @@ if [[ $(id -u) -ne 0 ]]; then
fi
}
-function make_directory()
-{
+function make_directory(){
if [ ! -d "${1}" ]; then
debug_message "Folder does not exist. Making it: ${1}"
mkdir -p "${1}"
@@ -84,36 +82,37 @@ function make_directory()
}
#Used only for debugging. Gives feedback into standard out if verboseMode=1, also to $logFile if you set it
-function debug_message()
-{
+function debug_message(){
if [ "$verboseMode" = 1 ]; then
/bin/echo "DEBUG: $*"
fi
}
#Publish a message to the log (and also to the debug channel)
-function log_message()
-{
- if [ -e "$logFile" ]; then
- /bin/echo "$(date): $*" >> "$logFile"
- fi
+function log_message(){
+ echo "$(date): $*" | tee >( cat >> "$logFile" )
+ debug_message "$*"
+}
- if [ "$verboseMode" = 1 ]; then
- debug_message "$*"
+function rotate_logs(){
+ touch "$logFile"
+ chmod 655 "$logFile"
+ if [ "$(wc -l < "$logFile" | xargs)" -ge 30000 ]; then
+ log_message "Rotating Logs"
+ mv "$logFile" "$logFile".old
+ touch "$logFile"
+ log_message "Logfile Rotated"
fi
-
}
#Report messages go to our report, but also pass through log_message (and thus, also to debug_message)
-function report_message()
-{
+function report_message(){
/bin/echo "$@" >> "$reportFile"
log_message "$@"
}
# Initiate logging
-function initiate_logging()
-{
+function initiate_logging(){
if ! touch "$logFile" ; then
debug_message "ERROR: Logging fail. Cannot create log file"
# Delete Baseline Temp Dir
@@ -125,15 +124,13 @@ fi
}
#Only delete something if the variable has a value!
-function rm_if_exists()
-{
+function rm_if_exists(){
if [ -n "${1}" ] && [ -e "${1}" ];then
/bin/rm -rf "${1}"
fi
}
-function initiate_report()
-{
+function initiate_report(){
reportFile="/usr/local/Baseline/Baseline-Report.txt"
if ! touch "$reportFile" ; then
debug_message "ERROR: Reporting fail. Cannot create report file"
@@ -147,8 +144,7 @@ function initiate_report()
}
#Define our script exit process. Usage: cleanup_and_exit 'exitcode' 'exit message'
-function cleanup_and_exit()
-{
+function cleanup_and_exit(){
# Check if we are going to restart
check_restart_option
@@ -185,8 +181,7 @@ function cleanup_and_exit()
# This function doesn't always shut down, but I'm leaving the name in place for now at least.
# Usage: cleanup_and_exit 'exitcode' 'exit message'
-function cleanup_and_restart()
-{
+function cleanup_and_restart(){
# Check if we are going to restart
check_restart_option
@@ -255,8 +250,7 @@ function cleanup_and_restart()
shutdown -r now
}
-function no_sleeping()
-{
+function no_sleeping(){
/usr/bin/caffeinate -d -i -m -u &
caffeinatepid=$!
@@ -272,8 +266,7 @@ function dialog_command(){
#This function is modified from the awesome one given to us via Adam Codega. Thanks Adam!
#https://github.com/acodega/dialog-scripts/blob/main/dialogCheckFunction.sh
-function install_dialog()
-{
+function install_dialog(){
# Check for Dialog and install if not found. We'll try 10 times before exiting the script with a fail.
dialogInstallAttempts=0
@@ -314,8 +307,7 @@ function install_dialog()
done
}
-function install_installomator()
-{
+function install_installomator(){
# Check for Installomator and install if not found. We'll try 10 times before exiting the script with a fail.
installomatorInstallAttempts=0
@@ -353,8 +345,7 @@ function install_installomator()
}
#Checks if a user is logged in yet, and if not it waits and loops until we can confirm there is a real user
-function wait_for_user()
-{
+function wait_for_user(){
#Set our test to false
verifiedUser="false"
@@ -387,16 +378,14 @@ function wait_for_user()
}
#Check for custom config. We prioritize this even over a mobileconfig file.
-function check_for_custom_plist()
-{
+function check_for_custom_plist(){
if [ -e $customConfigPlist ] && ! $configFromArgument; then
BaselineConfig="$customConfigPlist"
fi
}
#Verify configuration file
-function verify_configuration_file()
-{
+function verify_configuration_file(){
#We need to make sure our configuration file is in place. By the time the user logs in, this should have happened.
debug_message "Verifying configuration file. Failure here probably means an MDM profile hasn't been properly scoped, or there's a problem with the MDM delivering the profile."
@@ -428,8 +417,7 @@ function verify_configuration_file()
fi
}
-function build_installomator_array()
-{
+function build_installomator_array(){
#Set an index internal to this function
index=0
#Loop through and test if there is a value in the slot of this index for the given array
@@ -444,8 +432,7 @@ function build_installomator_array()
done
}
-function process_installomator_labels()
-{
+function process_installomator_labels(){
#Set an index internal to this function
currentIndex=0
#Loop through and test if there is a value in the slot of this index for the given array
@@ -515,8 +502,7 @@ function process_installomator_labels()
}
# Our main list builder for the Dialog window
-function build_dialog_array()
-{
+function build_dialog_array(){
## Usage: Build the dialog array for the given profile configuration key. $1 is the name of the key
## Example: build_dialog_array Scripts | InitialScripts | Packages | Installomator
@@ -569,8 +555,7 @@ function build_dialog_array()
done
}
-function process_scripts()
-{
+function process_scripts(){
# Usage: process_scripts ProfileKey
# Actual use: process_scripts [ InitialScripts | Scripts ]
#Set an index internal to this function
@@ -705,8 +690,7 @@ function process_scripts()
done
}
-function build_pkg_arrays()
-{
+function build_pkg_arrays(){
#Set an index internal to this function
index=0
#Loop through and test if there is a value in the slot of this index for the given array
@@ -721,8 +705,7 @@ function build_pkg_arrays()
done
}
-function process_pkgs()
-{
+function process_pkgs(){
#Set an index internal to this function
currentIndex=0
#Loop through and test if there is a value in the slot of this index for the given array
@@ -908,8 +891,7 @@ function copy_icons_dir(){
fi
}
-function build_dialog_json_file()
-{
+function build_dialog_json_file(){
# Initiate Json file
/bin/echo "{\"listitem\" : [" >> $dialogJsonFile
# For each item in our list, add the Json line
@@ -927,16 +909,14 @@ function build_dialog_json_file()
}
-function build_dialog_list_options()
-{
+function build_dialog_list_options(){
# This function populates an array with all of the items Baseline iterates through
for i in $dialogList; do
dialogListItems+=(--listitem $i)
done
}
-function check_exit_condition()
-{
+function check_exit_condition(){
exitConditionPath=""
# If `ExitCondition` key is passed in the configuration profile, then set a variable
if $pBuddy -c "Print :ExitCondition" "$BaselineConfig" > /dev/null 2>&1; then
@@ -977,8 +957,7 @@ function check_for_bail_out(){
fi
}
-function check_restart_option()
-{
+function check_restart_option(){
restartSetting=$($pBuddy -c "Print :Restart" "$BaselineConfig" 2> /dev/null )
logOutSetting=$($pBuddy -c "Print :LogOut" "$BaselineConfig" 2> /dev/null )
@@ -1041,8 +1020,7 @@ function check_restart_option()
}
-function check_progress_options()
-{
+function check_progress_options(){
# Set variable for whether or not we'll display a progress bar. Defaults to 'false'
showProgressBarSetting=$($pBuddy -c "Print :ProgressBar" "$BaselineConfig" 2> /dev/null )
@@ -1062,8 +1040,7 @@ function check_progress_options()
fi
}
-function increment_progress_bar()
-{
+function increment_progress_bar(){
# If we're not displaying the progress bar, skip
if [ "$showProgressBar" != "true" ]; then
return
@@ -1077,8 +1054,7 @@ function increment_progress_bar()
dialog_command "progress: $progressBarPercentage"
}
-function set_progressbar_text()
-{
+function set_progressbar_text(){
# If we're not displaying the progress bar, skip
if [ "$progressBarDisplayNames" != "true" ]; then
return
@@ -1203,8 +1179,7 @@ function update_tracker(){
fi
}
-function check_silent_option()
-{
+function check_silent_option(){
# If silentMode hasn't been set yet, check if its in our configuration file.
if [ -z "$silentModeEnabled" ]; then
# This will exit empty if the key does not exist.
@@ -1529,8 +1504,7 @@ fi
# I also don't know how to set the variable by passing the name of that variable as an argument to the function.
# So I'll have to define this function several times.
# I grow old … I grow old …I shall wear the bottoms of my trousers rolled..
-function configure_dialog_list_arguments()
-{
+function configure_dialog_list_arguments(){
# $1 is the SwiftDialog option to change, $2 is the default value for that option if its not included in the profile
if (($dialogListArguments[(Ie)$1])); then
# $1 was included in the customization, so we report it and move along
@@ -1581,8 +1555,7 @@ if [ -n "$dialogSuccessArguments" ]; then
eval 'for customization in '$dialogSuccessArguments'; do finalSuccessCommand+=$customization; done'
fi
-function configure_dialog_success_arguments()
-{
+function configure_dialog_success_arguments(){
# $1 is the SwiftDialog option to change, $2 is the default value for that option if its not included in the profile
if (($dialogSuccessArguments[(Ie)$1])); then
# $1 was included in the customization, so we report it and move along
@@ -1627,8 +1600,7 @@ if [ -n "$dialogFailureArguments" ]; then
eval 'for customization in '$dialogFailureArguments'; do finalFailureCommand+=$customization; done'
fi
-function configure_dialog_failure_arguments()
-{
+function configure_dialog_failure_arguments(){
# $1 is the SwiftDialog option to change, $2 is the default value for that option if its not included in the profile
if (($dialogFailureArguments[(Ie)$1])); then
# $1 was included in the customization, so we report it and move along
From be775d7c37947f509ce962eec391060d3737adc3 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 21:59:13 -0800
Subject: [PATCH 10/25] Update Baseline.sh
---
Baseline.sh | 49 ++++++++++++++++++++++++-------------------------
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/Baseline.sh b/Baseline.sh
index ac4dba0..9ee4c87 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -30,6 +30,7 @@ BaselineDir="/usr/local/Baseline"
BaselineTempDir="$(mktemp -d /var/tmp/baselineTempDir.XXXXXXX)"
customConfigPlist="$BaselineDir/BaselineConfig.plist"
logFile="/var/log/Baseline.log"
+reportFile="/var/log/Baseline-Report.txt"
BaselinePath="$BaselineDir/Baseline.sh"
BaselineScripts="$BaselineDir/Scripts"
BaselinePackages="$BaselineDir/Packages"
@@ -131,7 +132,6 @@ function rm_if_exists(){
}
function initiate_report(){
- reportFile="/usr/local/Baseline/Baseline-Report.txt"
if ! touch "$reportFile" ; then
debug_message "ERROR: Reporting fail. Cannot create report file"
# Delete Baseline Temp Dir
@@ -372,7 +372,6 @@ function wait_for_user(){
debug_message "Disabling verbose output to prevent logspam while waiting for user at timestamp: $(date +%s)"
set +x
done
- set -x
debug_message "Re-enabling verbose output after finding user at timestamp: $(date +%s)"
}
@@ -479,14 +478,14 @@ function process_installomator_labels(){
$installomatorPath $currentLabel ${defaultInstallomatorOptions[@]} ${currentArgumentArray[@]} > /dev/null 2>&1
installomatorExitCode=$?
if [ $installomatorExitCode != 0 ]; then
- report_message "Installomator failed to install: $currentLabel - Exit Code: $installomatorExitCode"
+ report_message "Failed Item - Installomator: $currentLabel - Exit Code: $installomatorExitCode"
failList+=("$currentDisplayName")
# If we're NOT using the integrated SwiftDialog, then
if [[ $useInstallomatorSwiftDialogIntegration != "true" ]]; then
dialog_command "listitem: title: $currentDisplayName, status: fail"
fi
else
- report_message "Installomator successfully installed: $currentLabel"
+ report_message "Successful Item - Installomator: $currentLabel"
successList+=("$currentDisplayName")
if [[ $useInstallomatorSwiftDialogIntegration != "true" ]]; then
dialog_command "listitem: title: $currentDisplayName, status: success"
@@ -524,20 +523,20 @@ function build_dialog_array(){
currentIconPath=$($pBuddy -c "Print :$configKey:${index}:Icon" "$BaselineConfig")
# Check if Icon is remotely hosted URL
if [[ ${currentIconPath:0:4} == "http" ]]; then
- report_message "Icon set to URL: $currentIconPath"
+ log_message "Icon set to URL: $currentIconPath"
# Check if Icon is an SF Symbol
elif [[ ${currentIconPath:0:3} == 'SF=' ]]; then
- report_message "Icon set to SF Symbol: $currentIconPath"
+ log_message "Icon set to SF Symbol: $currentIconPath"
#Check of the given icon path exists on disk
elif [ -e "$currentIconPath" ]; then
- report_message "Icon found: $currentIconPath"
+ log_message "Icon found: $currentIconPath"
elif [ -e "$BaselineTempIconsDir/$currentIconPath" ]; then
- report_message "Icon found: $currentIconPath"
+ log_message "Icon found: $currentIconPath"
currentIconPath="$BaselineTempIconsDir/$currentIconPath"
chmod 655 "${currentIconPath}"
else
#If we can't find the local file, report and leave blank
- report_message "ERROR: Icon key cannot be located: $currentIconPath"
+ log_message "ERROR: Icon key cannot be located: $currentIconPath"
currentIconPath=""
fi
else
@@ -588,11 +587,11 @@ function process_scripts(){
#Check if curl exited cleanly
if [ "$scriptDownloadExitCode" != 0 ];then
#Report a failed download
- report_message "ERROR: Script failed to download. Check your URL: $currentScriptPath"
+ report_message "Failed Item - Script download error: $currentScriptPath"
#Rm the output of our curl command. This will result in it being processed as a failure
rm_if_exists "$currentScript"
else
- report_message "Script downloaded successfully: $currentScriptPath"
+ log_message "Script downloaded successfully: $currentScriptPath"
#Make our downloaded script executable
chmod +x "$currentScript"
fi
@@ -605,7 +604,7 @@ function process_scripts(){
fi
#If the currentScript variable still isn't set to an existing file we need to bail..
if [ ! -e "$currentScript" ]; then
- report_message "ERROR: Script does not exist: $currentScript"
+ report_message "Failed Item - Script does not exist: $currentScript"
# Iterate the index up one
currentIndex=$((currentIndex+1))
increment_progress_bar
@@ -625,7 +624,7 @@ function process_scripts(){
actualMD5=$(md5 -q "$currentScript")
#Evaluate whether the expected and actual MD5 do not match
if [ "$actualMD5" != "$expectedMD5" ]; then
- report_message "ERROR: MD5 value mismatch. Expected: $expectedMD5 Actual: $actualMD5"
+ report_message "Failed Item - Script MD5 error: $currentScriptPath - Expected $expectedMD5 - Actual $actualMD5"
# Iterate the index up one
currentIndex=$((currentIndex+1))
# Only increment the progress bar if we're processing Scripts, not InitialScripts since users won't see those
@@ -667,11 +666,11 @@ function process_scripts(){
"$currentScript" ${currentArgumentArray[@]} >> "$ScriptOutputLog" 2>&1
scriptExitCode=$?
if [ $scriptExitCode != 0 ]; then
- report_message "Script failed to complete: $currentScript - Exit Code: $scriptExitCode"
+ report_message "Failed Item - Script runtime error: $currentScript - Exit Code: $scriptExitCode"
dialog_command "listitem: title: $currentDisplayName, status: fail"
failList+=("$currentDisplayName")
else
- report_message "Script completed successfully: $currentScript"
+ report_message "Successful Item - Script: $currentScript"
dialog_command "listitem: title: $currentDisplayName, status: success"
successList+=("$currentDisplayName")
fi
@@ -749,7 +748,7 @@ function process_pkgs(){
downloadResult=$?
#Verify curl exited with 0
if [ "$downloadResult" != 0 ]; then
- report_message "ERROR: PKG failed to download: $currentPKGPath"
+ report_message "Failed Item - Package download error: $currentPKGPath"
# Iterate the index up one
currentIndex=$((currentIndex+1))
increment_progress_bar
@@ -758,7 +757,7 @@ function process_pkgs(){
# Bail this pass through the while loop and continue processing next item
continue
else
- debug_message "PKG downloaded successfully: $currentPKGPath downloaded to $currentPKG"
+ debug_message "PKG downloaded successfully: $currentPKGPath"
fi
fi
@@ -772,7 +771,7 @@ function process_pkgs(){
# The path to the PKG appears to exist within Baseline directory
currentPKG="$BaselinePackages/$currentPKGPath"
else
- report_message "Package not found $currentPKGPath"
+ report_message "Failed Item - Package does not exist: $currentPKGPath"
dialog_command "listitem: title: $currentDisplayName, status: fail"
failList+=("$currentDisplayName")
currentIndex=$((currentIndex+1))
@@ -822,7 +821,7 @@ function process_pkgs(){
actualTeamID=$(spctl -a -vv -t install "$currentPKG" 2>&1 | awk -F '(' '/origin=/ {print $2 }' | tr -d ')' )
# Check if actual does not match expected
if [ "$expectedTeamID" != "$actualTeamID" ]; then
- report_message "TeamID validation of PKG failed: $currentPKG - Expected: $expectedTeamID Actual: $actualTeamID"
+ report_message "Failed Item - Package TeamID error: $currentPKG - Expected - $expectedTeamID Actual - $actualTeamID"
dialog_command "listitem: title: $currentDisplayName, status: fail"
failList+=("$currentDisplayName")
# Iterate the index up one
@@ -833,7 +832,7 @@ function process_pkgs(){
# Bail this pass through the while loop and continue processing next item
continue
else
- report_message "TeamID of PKG validated: $currentPKG $expectedTeamID"
+ log_message "TeamID of PKG validated: $currentPKG $expectedTeamID"
fi
fi
@@ -843,7 +842,7 @@ function process_pkgs(){
actualMD5=$(md5 -q "$currentPKG")
# Check if actual does not match expected
if [ "$expectedMD5" != "$actualMD5" ]; then
- report_message "MD5 validation of PKG failed: $currentPKG - Expected: $expectedMD5 Actual: $actualMD5"
+ report_message "Failed Item - Package MD5 error: $currentPKG - Expected - $expectedMD5 Actual - $actualMD5"
dialog_command "listitem: title: $currentDisplayName, status: fail"
failList+=("$currentDisplayName")
# Iterate the index up one
@@ -855,7 +854,7 @@ function process_pkgs(){
# Bail this pass through the while loop and continue processing next item
continue
else
- report_message "MD5 of PKG validated: $currentPKG $expectedMD5"
+ log_message "MD5 of PKG validated: $currentPKG $expectedMD5"
fi
fi
@@ -865,11 +864,11 @@ function process_pkgs(){
pkgExitCode=$?
# Verify the install completed successfully
if [ $pkgExitCode != 0 ]; then
- report_message "Package failed to complete: $currentPKG - Exit Code: $pkgExitCode"
+ report_message "Failed Item - Package installation error: $currentPKG - Exit Code: $pkgExitCode"
dialog_command "listitem: title: $currentDisplayName, status: fail"
failList+=("$currentDisplayName")
else
- report_message "Package completed successfully: $currentPKG"
+ report_message "Successful Item - Package: $currentPKG"
dialog_command "listitem: title: $currentDisplayName, status: success"
successList+=("$currentDisplayName")
fi
@@ -1131,7 +1130,7 @@ function initiate_tracker_file(){
report_message "Invalid tracker file. Cannot not use tracker feature."
useTracker=false
else
- report_message "Valid tracker file found: $trackerFilePath"
+ report_message "Tracker file will be used: $trackerFilePath"
fi
# Else, create the file. If we can't create it, turn off useTracker
else
From 1a5e7dff90865913c2da215f496465a339b71e77 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 21:59:31 -0800
Subject: [PATCH 11/25] Updating example configs to use Firefox
---
ExampleConfigurationFiles/Baseline-BasicExample.mobileconfig | 4 ++--
.../Baseline-ProductionExample.mobileconfig | 4 ++--
ExampleConfigurationFiles/BaselineConfig.plist | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ExampleConfigurationFiles/Baseline-BasicExample.mobileconfig b/ExampleConfigurationFiles/Baseline-BasicExample.mobileconfig
index 4ff0e5d..b22ee73 100644
--- a/ExampleConfigurationFiles/Baseline-BasicExample.mobileconfig
+++ b/ExampleConfigurationFiles/Baseline-BasicExample.mobileconfig
@@ -22,9 +22,9 @@
DisplayName
- Google Chrome
+ Firefox
Label
- googlechromepkg
+ firefoxpkg
DisplayName
diff --git a/ExampleConfigurationFiles/Baseline-ProductionExample.mobileconfig b/ExampleConfigurationFiles/Baseline-ProductionExample.mobileconfig
index 1beb334..9b5c1a2 100644
--- a/ExampleConfigurationFiles/Baseline-ProductionExample.mobileconfig
+++ b/ExampleConfigurationFiles/Baseline-ProductionExample.mobileconfig
@@ -9,11 +9,11 @@
DisplayName
- Google Chrome
+ Firefox
Icon
ExampleIcon.png
Label
- googlechromepkg
+ firefoxpkg
DisplayName
diff --git a/ExampleConfigurationFiles/BaselineConfig.plist b/ExampleConfigurationFiles/BaselineConfig.plist
index 2ddff75..66a28bd 100644
--- a/ExampleConfigurationFiles/BaselineConfig.plist
+++ b/ExampleConfigurationFiles/BaselineConfig.plist
@@ -19,9 +19,9 @@
DisplayName
- Google Chrome
+ Firefox
Label
- googlechromepkg
+ firefoxpkg
DisplayName
From 8d657be430dbcbcf8cd67601bf6aefc87de98d6e Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 22:12:31 -0800
Subject: [PATCH 12/25] Update Baseline.sh
silent mode log fix
---
Baseline.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Baseline.sh b/Baseline.sh
index a794a33..498515c 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -1198,7 +1198,7 @@ function check_silent_option(){
log_message "No SilentMode key in configuration file"
silentModeEnabled="false"
elif [[ "$silentModeEnabled" == "true" ]]; then
- log_message "SilentMode set to true from configuration file"
+ log_message "SilentMode set to true"
silentModeEnabled=true
elif [[ "$silentModeEnabled" == "false" ]]; then
log_message "SilentMode set to false from configuration file"
@@ -1321,6 +1321,7 @@ while [ ! -z "$1" ]; do
fi
;;
-s|--silent|--silent-mode)
+ log_message "Setting Silent Mode from Command-Line"
silentModeEnabled=true
;;
-t|--tracker)
From 37a6133e4e2846a7ed6cfb08c9ae3ebc3728abd1 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 22:12:36 -0800
Subject: [PATCH 13/25] Update Baseline v2.1beta1 Release Notes.md
---
Baseline v2.1beta1 Release Notes.md | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Baseline v2.1beta1 Release Notes.md b/Baseline v2.1beta1 Release Notes.md
index f54d5dc..52204d6 100644
--- a/Baseline v2.1beta1 Release Notes.md
+++ b/Baseline v2.1beta1 Release Notes.md
@@ -1,9 +1,14 @@
# Baseline v2.1beta1
-- New Configuration Key: `Subtitle`
- - Added support for the new subtitle feature in SwiftDialog 2.4. (#^^^ LINK HERE ^^^#)
-
+- New Configuration Key for Each Item Type: `Subtitle`
+ - Added support for the new subtitle feature in SwiftDialog 2.4+ which allows Subtitles for each line item
+- New Boolena Configuration Key: `Silent`
+ - Previously only available as a script parameter, now can be used in the configuration profile itself
+ - Using `--silent` at the command line overrides the settings in the configuration profile
+# Bugs and Housekeeping
+- Moved Report file from `/usr/local/Baseline/Baseline-Report.txt` to `/var/log/Baseline-Report.txt`
+- Improved logging function and used standard language for logging item progress/details
# Additional Goals
- Move more features over to the json file, that way we don't run into shell length issues if someone puts a long `--message` or `--infobox` string
From 330502aac91a8437e66b3a238c7a7c4df58818be Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 22:17:38 -0800
Subject: [PATCH 14/25] Update Baseline.sh
---
Baseline.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Baseline.sh b/Baseline.sh
index 08f26c7..a592ed0 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -6,7 +6,7 @@ set -x
# @BigMacAdmin on the MacAdmins Slack
# trevor@secondsonconsulting.com
-scriptVersion="v.2.0.1"
+scriptVersion="dev"
########################################################################################################
########################################################################################################
From 4c0454131fb411f3c4b977be9bbb9ddbaa882d47 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 22:21:33 -0800
Subject: [PATCH 15/25] Update Baseline.sh
---
Baseline.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Baseline.sh b/Baseline.sh
index 30ddaf7..2341980 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -6,7 +6,7 @@ set -x
# @BigMacAdmin on the MacAdmins Slack
# trevor@secondsonconsulting.com
-scriptVersion="dev"
+scriptVersion="2.1beta1"
########################################################################################################
########################################################################################################
From f56b3d383e8cbef604059966d38b837e810dd60b Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 22:24:07 -0800
Subject: [PATCH 16/25] Update Baseline v2.1beta1 Release Notes.md
---
Baseline v2.1beta1 Release Notes.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Baseline v2.1beta1 Release Notes.md b/Baseline v2.1beta1 Release Notes.md
index 52204d6..9814a22 100644
--- a/Baseline v2.1beta1 Release Notes.md
+++ b/Baseline v2.1beta1 Release Notes.md
@@ -6,9 +6,11 @@
- Using `--silent` at the command line overrides the settings in the configuration profile
+
# Bugs and Housekeeping
- Moved Report file from `/usr/local/Baseline/Baseline-Report.txt` to `/var/log/Baseline-Report.txt`
- Improved logging function and used standard language for logging item progress/details
+- Fixed a bug where Baseline would exit when run from Jamf due to Jamf default script parameters
# Additional Goals
- Move more features over to the json file, that way we don't run into shell length issues if someone puts a long `--message` or `--infobox` string
From 6da660eb51d6c8574245a0ac3284c0a41fd93037 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Sun, 3 Mar 2024 22:26:17 -0800
Subject: [PATCH 17/25] Update Baseline v2.1beta1 Release Notes.md
---
Baseline v2.1beta1 Release Notes.md | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/Baseline v2.1beta1 Release Notes.md b/Baseline v2.1beta1 Release Notes.md
index 9814a22..22e2ae3 100644
--- a/Baseline v2.1beta1 Release Notes.md
+++ b/Baseline v2.1beta1 Release Notes.md
@@ -1,16 +1,11 @@
-# Baseline v2.1beta1
+## What's New?
- New Configuration Key for Each Item Type: `Subtitle`
- Added support for the new subtitle feature in SwiftDialog 2.4+ which allows Subtitles for each line item
- New Boolena Configuration Key: `Silent`
- Previously only available as a script parameter, now can be used in the configuration profile itself
- Using `--silent` at the command line overrides the settings in the configuration profile
-
-
-# Bugs and Housekeeping
+## Bugs and Housekeeping
- Moved Report file from `/usr/local/Baseline/Baseline-Report.txt` to `/var/log/Baseline-Report.txt`
- Improved logging function and used standard language for logging item progress/details
-- Fixed a bug where Baseline would exit when run from Jamf due to Jamf default script parameters
-
-# Additional Goals
-- Move more features over to the json file, that way we don't run into shell length issues if someone puts a long `--message` or `--infobox` string
+- Fixed a bug where Baseline would exit when run from Jamf due to Jamf default script
From 575032766aadb550a06a7437e5aa697b41e30555 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Mon, 4 Mar 2024 10:56:36 -0800
Subject: [PATCH 18/25] Updated Manifests
---
.../com.secondsonconsulting.baseline.json | 109 ++++++++++++++++--
.../com.secondsonconsulting.baseline.plist | 34 +++++-
2 files changed, 133 insertions(+), 10 deletions(-)
diff --git a/ProfileManifest/com.secondsonconsulting.baseline.json b/ProfileManifest/com.secondsonconsulting.baseline.json
index 0209fee..341302f 100644
--- a/ProfileManifest/com.secondsonconsulting.baseline.json
+++ b/ProfileManifest/com.secondsonconsulting.baseline.json
@@ -52,6 +52,16 @@
"type": "string",
"title": "Arguments",
"description": "Arguments you want to pass to the Installomator command for this label."
+ },
+ "Icon": {
+ "type": "string",
+ "title": "Icon",
+ "description": "The icon you want to appear in the SwiftDialog menu as this Installomator label is processed. Can be a URL or local file path."
+ },
+ "Subtitle": {
+ "type": "string",
+ "title": "Subtitle",
+ "description": "The subtitle text to appear on this line item."
}
}
},
@@ -88,6 +98,16 @@
"type": "string",
"title": "Arguments",
"description": "Arguments you want to pass to the installer command for this package."
+ },
+ "Icon": {
+ "type": "string",
+ "title": "Icon",
+ "description": "The icon you want to appear in the SwiftDialog menu as this package is installed. Can be a URL or local file path."
+ },
+ "Subtitle": {
+ "type": "string",
+ "title": "Subtitle",
+ "description": "The subtitle text to appear on this line item."
}
}
},
@@ -119,6 +139,16 @@
"type": "string",
"title": "Arguments",
"description": "Arguments you want to pass to the script when it is run."
+ },
+ "Icon": {
+ "type": "string",
+ "title": "Icon",
+ "description": "The icon you want to appear in the SwiftDialog menu as this script is run. Can be a URL or local file path."
+ },
+ "Subtitle": {
+ "type": "string",
+ "title": "Subtitle",
+ "description": "The subtitle text to appear on this line item."
}
}
},
@@ -128,39 +158,102 @@
},
"Restart": {
"type": "boolean",
- "title": "Restart",
- "description": "This setting controls whether Baseline forces a restart after completion. Default is true.",
+ "title": "Force Restart",
+ "default": true,
+ "description": "This setting controls whether Baseline forces a restart after completion.",
"property_order": 25
},
+ "LogOut": {
+ "type": "boolean",
+ "title": "Force Log Out",
+ "default": false,
+ "description": "This setting controls whether Baseline forces a restart after completion.",
+ "property_order": 30
+ },
+ "BlurScreen": {
+ "type": "boolean",
+ "title": "Blur Screen",
+ "default": true,
+ "description": "This setting controls whether Baseline uses the SwiftDialog --blurscreen feature. Default is true. If you set to false, consider using --ontop in your DialogListOptions key",
+ "property_order": 35
+ },
+ "ProgressBar": {
+ "type": "boolean",
+ "title": "Show Progress Bar",
+ "default": false,
+ "description": "This setting controls whether Baseline displays a progress bar.",
+ "property_order": 40
+ },
+ "ProgressBarDisplayNames": {
+ "type": "boolean",
+ "title": "Show Display Names on Progress Bar",
+ "default": false,
+ "description": "This setting controls whether Baseline displays the current item being processed under the progress bar.",
+ "property_order": 45
+ },
"CleanupAfterUse": {
"type": "boolean",
"title": "Cleanup After Use",
- "description": "This setting controls whether Baseline forces a restart after completion. Default is true.",
- "property_order": 30
+ "default": true,
+ "description": "This setting controls whether Baseline deletes it's install directory after use: /usr/local/Baseline.",
+ "property_order": 50
+ },
+ "ReinstallDialog": {
+ "type": "boolean",
+ "title": "Reinstall SwiftDialog",
+ "description": "This setting controls whether Baseline will reinstall SwiftDialog as the final step before completion. Default behavior if this key is omitted will reinstall SwiftDialog if a custom PNG is found in /Library/Application Support/Dialog/Dialog.png.",
+ "property_order": 55
+ },
+ "InstallomatorSwiftDialogIntegration": {
+ "type": "boolean",
+ "title": "Use Installomator SwiftDialog Integration",
+ "default": false,
+ "description": "Tell Installomator to use it's built in SwiftDialog integration for the List View.",
+ "property_order": 60
+ },
+ "IgnoreDefaultInstallomatorOptions": {
+ "type": "boolean",
+ "title": "Ignore Default Installomator Options",
+ "default": false,
+ "description": "By default, Baseline uses \"NOTIFY=silent\" and \"BLOCKING_PROCESS_ACTION=kill\" Installomator options. Setting this to True means Baseline will not use those options.",
+ "property_order": 65
+ },
+ "Button1Enabled": {
+ "type": "boolean",
+ "title": "Button 1 Enabled",
+ "default": false,
+ "description": "This setting enables SwiftDialog \"Button 1\" (the OK button) on the Baseline List View. This allows users to dismiss the list view and continue working while Baseline runs. By default this button is disabled.",
+ "property_order": 70
},
"DialogListOptions": {
"type": "string",
"title": "Dialog List Window Options",
"description": "SwiftDialog options for the primary Baseline progress list window.",
- "property_order": 35
+ "property_order": 75
},
"DialogSuccessOptions": {
"type": "string",
"title": "Dialog Success Window Options",
"description": "SwiftDialog options for the Success Dialog window.",
- "property_order": 40
+ "property_order": 80
},
"DialogFailureOptions": {
"type": "string",
"title": "Dialog Failure Window Options",
"description": "SwiftDialog options for the Failure Dialog window.",
- "property_order": 45
+ "property_order": 85
},
"ExitCondition": {
"type": "string",
"title": "Exit Condition",
"description": "Define a file or folder path. If this file or folder exists, Baseline will exit quietly without processing any items.",
- "property_order": 50
+ "property_order": 90
+ },
+ "BailOutFile": {
+ "type": "string",
+ "title": "Bail Out File",
+ "description": "Define a file path. If this file exists at any point while Baseline is running, Baseline will exit and will not process additional items.",
+ "property_order": 95
}
}
}
\ No newline at end of file
diff --git a/ProfileManifest/com.secondsonconsulting.baseline.plist b/ProfileManifest/com.secondsonconsulting.baseline.plist
index b9edb99..03bd8e0 100644
--- a/ProfileManifest/com.secondsonconsulting.baseline.plist
+++ b/ProfileManifest/com.secondsonconsulting.baseline.plist
@@ -13,7 +13,7 @@
pfm_format_version
1
pfm_last_modified
- 2024-01-24T00:00:00Z
+ 2024-03-03T00:00:00Z
pfm_platforms
macOS
@@ -235,6 +235,16 @@ A profile can consist of payloads with different version numbers. For example, c
pfm_type
string
+
+ pfm_description
+ The subtitle text to appear on this line item.
+ pfm_name
+ Subtitle
+ pfm_title
+ Subtitle
+ pfm_type
+ string
+
pfm_type
dictionary
@@ -315,6 +325,16 @@ A profile can consist of payloads with different version numbers. For example, c
pfm_type
string
+
+ pfm_description
+ The subtitle text to appear on this line item.
+ pfm_name
+ Subtitle
+ pfm_title
+ Subtitle
+ pfm_type
+ string
+
pfm_type
dictionary
@@ -385,6 +405,16 @@ A profile can consist of payloads with different version numbers. For example, c
pfm_type
string
+
+ pfm_description
+ The subtitle text to appear on this line item.
+ pfm_name
+ Subtitle
+ pfm_title
+ Subtitle
+ pfm_type
+ string
+
pfm_type
dictionary
@@ -573,6 +603,6 @@ A profile can consist of payloads with different version numbers. For example, c
pfm_unique
pfm_version
- 2
+ 3
From 3d2bebf8d79d7d61b426c891150d663bd22a05db Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Wed, 6 Mar 2024 09:07:16 -0800
Subject: [PATCH 19/25] Update README.md
---
ProfileManifest/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ProfileManifest/README.md b/ProfileManifest/README.md
index 1305713..6871c57 100644
--- a/ProfileManifest/README.md
+++ b/ProfileManifest/README.md
@@ -4,4 +4,4 @@ These files may not match what's in the official public ProfileManifest reposito
[The office ProfileManifest repository is the proper place to get the latest public release.](https://github.com/ProfileCreator/ProfileManifests/blob/master/Manifests/ManagedPreferencesApplications/com.secondsonconsulting.baseline.plist)
-[Jamf JSON Schema](https://github.com/Jamf-Custom-Profile-Schemas/ProfileManifestsMirror/blob/main/manifests/ManagedPreferencesApplications/com.secondsonconsulting.baseline.json)
+[Jamf JSON Schema](https://github.com/ProfileCreator/ProfileManifests/blob/master/Manifests/ManagedPreferencesApplications/com.secondsonconsulting.baseline.plist)
From 1a9c3efcd3839c6cfb65cb8fb30ce05683cb9b36 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Thu, 14 Mar 2024 08:18:58 -0700
Subject: [PATCH 20/25] zsh no-rcs
Adding `--no-rcs` to the #! on pre/post install scripts to prevent oddities with PKG installs
---
Build/Baseline_daemon-postinstall.sh | 2 +-
Build/Baseline_daemon-preinstall.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Build/Baseline_daemon-postinstall.sh b/Build/Baseline_daemon-postinstall.sh
index 434e9b5..b46d2f1 100755
--- a/Build/Baseline_daemon-postinstall.sh
+++ b/Build/Baseline_daemon-postinstall.sh
@@ -1,4 +1,4 @@
-#!/bin/zsh
+#!/bin/zsh --no-rcs
# Set variables for path/name
launchDPath="/Library/LaunchDaemons"
diff --git a/Build/Baseline_daemon-preinstall.sh b/Build/Baseline_daemon-preinstall.sh
index e57224c..7b2a0fb 100755
--- a/Build/Baseline_daemon-preinstall.sh
+++ b/Build/Baseline_daemon-preinstall.sh
@@ -1,4 +1,4 @@
-#!/bin/zsh
+#!/bin/zsh --no-rcs
# Function to exit with an error message
exit_with_error() {
From e2cf9f2a04581e1d0dea4d0288a695c512dba925 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Mon, 18 Mar 2024 13:20:42 -0700
Subject: [PATCH 21/25] Update Baseline.sh
Added `--no-rcs` to Baseline.sh
Removed `beta` tag from the version number
---
Baseline.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Baseline.sh b/Baseline.sh
index 2341980..c781fcd 100755
--- a/Baseline.sh
+++ b/Baseline.sh
@@ -1,4 +1,4 @@
-#!/bin/zsh
+#!/bin/zsh --no-rcs
set -x
#dryRun=true
@@ -6,7 +6,7 @@ set -x
# @BigMacAdmin on the MacAdmins Slack
# trevor@secondsonconsulting.com
-scriptVersion="2.1beta1"
+scriptVersion="2.1"
########################################################################################################
########################################################################################################
From 9df9ac24927d373c2494c0ce5c19c7099259e442 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Mon, 18 Mar 2024 13:26:49 -0700
Subject: [PATCH 22/25] Update Baseline v2.1beta1 Release Notes.md
---
Baseline v2.1beta1 Release Notes.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/Baseline v2.1beta1 Release Notes.md b/Baseline v2.1beta1 Release Notes.md
index 22e2ae3..734d4b0 100644
--- a/Baseline v2.1beta1 Release Notes.md
+++ b/Baseline v2.1beta1 Release Notes.md
@@ -9,3 +9,4 @@
- Moved Report file from `/usr/local/Baseline/Baseline-Report.txt` to `/var/log/Baseline-Report.txt`
- Improved logging function and used standard language for logging item progress/details
- Fixed a bug where Baseline would exit when run from Jamf due to Jamf default script
+- Added `--no-rcs` to the shebang for Baseline.sh, preinstall, and postinstall scripts
From 18ecc1669b7f11b2350faf996e331157ff352fd5 Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Mon, 18 Mar 2024 13:30:56 -0700
Subject: [PATCH 23/25] Update README.md
---
ProfileManifest/README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ProfileManifest/README.md b/ProfileManifest/README.md
index 6871c57..edced36 100644
--- a/ProfileManifest/README.md
+++ b/ProfileManifest/README.md
@@ -2,6 +2,8 @@
These files may not match what's in the official public ProfileManifest repositories. They may be out of date, or they may be ahead of pull requests on the official repos. Check the modified date and use with caution.
+For JSONs or Manifests to use with Beta features, check this folder in the `dev` branch.
+
[The office ProfileManifest repository is the proper place to get the latest public release.](https://github.com/ProfileCreator/ProfileManifests/blob/master/Manifests/ManagedPreferencesApplications/com.secondsonconsulting.baseline.plist)
[Jamf JSON Schema](https://github.com/ProfileCreator/ProfileManifests/blob/master/Manifests/ManagedPreferencesApplications/com.secondsonconsulting.baseline.plist)
From 001e827d18ac1fa5c120f211da846368cafebe1c Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Mon, 18 Mar 2024 13:34:59 -0700
Subject: [PATCH 24/25] Update Baseline v2.1beta1 Release Notes.md
---
Baseline v2.1beta1 Release Notes.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/Baseline v2.1beta1 Release Notes.md b/Baseline v2.1beta1 Release Notes.md
index 734d4b0..8754a83 100644
--- a/Baseline v2.1beta1 Release Notes.md
+++ b/Baseline v2.1beta1 Release Notes.md
@@ -8,5 +8,6 @@
## Bugs and Housekeeping
- Moved Report file from `/usr/local/Baseline/Baseline-Report.txt` to `/var/log/Baseline-Report.txt`
- Improved logging function and used standard language for logging item progress/details
+- Changed example configuration files to use Firefox instead of Google Chrome
- Fixed a bug where Baseline would exit when run from Jamf due to Jamf default script
- Added `--no-rcs` to the shebang for Baseline.sh, preinstall, and postinstall scripts
From f3ff3f8956402c2e8bb7f4f6bb458081e8a350fa Mon Sep 17 00:00:00 2001
From: BigMac Admin <106293503+BigMacAdmin@users.noreply.github.com>
Date: Mon, 18 Mar 2024 15:49:52 -0700
Subject: [PATCH 25/25] Delete Baseline v2.1beta1 Release Notes.md
---
Baseline v2.1beta1 Release Notes.md | 13 -------------
1 file changed, 13 deletions(-)
delete mode 100644 Baseline v2.1beta1 Release Notes.md
diff --git a/Baseline v2.1beta1 Release Notes.md b/Baseline v2.1beta1 Release Notes.md
deleted file mode 100644
index 8754a83..0000000
--- a/Baseline v2.1beta1 Release Notes.md
+++ /dev/null
@@ -1,13 +0,0 @@
-## What's New?
-- New Configuration Key for Each Item Type: `Subtitle`
- - Added support for the new subtitle feature in SwiftDialog 2.4+ which allows Subtitles for each line item
-- New Boolena Configuration Key: `Silent`
- - Previously only available as a script parameter, now can be used in the configuration profile itself
- - Using `--silent` at the command line overrides the settings in the configuration profile
-
-## Bugs and Housekeeping
-- Moved Report file from `/usr/local/Baseline/Baseline-Report.txt` to `/var/log/Baseline-Report.txt`
-- Improved logging function and used standard language for logging item progress/details
-- Changed example configuration files to use Firefox instead of Google Chrome
-- Fixed a bug where Baseline would exit when run from Jamf due to Jamf default script
-- Added `--no-rcs` to the shebang for Baseline.sh, preinstall, and postinstall scripts