diff --git a/orbit/TUF.md b/orbit/TUF.md index 087f048407d7..081ff7518e15 100644 --- a/orbit/TUF.md +++ b/orbit/TUF.md @@ -7,8 +7,8 @@ Following are the currently deployed versions of fleetd components on the `stabl | Component\OS | macOS | Linux | Windows | Linux (arm64) | |--------------|--------------|--------|---------|---------------| -| orbit | 1.34.0 | 1.34.0 | 1.34.0 | 1.34.0 | -| desktop | 1.34.0 | 1.34.0 | 1.34.0 | 1.34.0 | +| orbit | 1.35.0 | 1.35.0 | 1.35.0 | 1.35.0 | +| desktop | 1.35.0 | 1.35.0 | 1.35.0 | 1.35.0 | | osqueryd | 5.14.1 | 5.14.1 | 5.14.1 | 5.14.1 | | nudge | 1.1.10.81462 | - | - | - | | swiftDialog | 2.1.0 | - | - | - | diff --git a/server/mdm/maintainedapps/scripts_test.go b/server/mdm/maintainedapps/scripts_test.go index 6c785a67f6b1..4fa549331a14 100644 --- a/server/mdm/maintainedapps/scripts_test.go +++ b/server/mdm/maintainedapps/scripts_test.go @@ -36,6 +36,9 @@ func TestScriptGeneration(t *testing.T) { err = json.Unmarshal(caskJSON, &cask) require.NoError(t, err) + cask.PreUninstallScripts = app.PreUninstallScripts + cask.PostUninstallScripts = app.PostUninstallScripts + t.Run(app.Identifier, func(t *testing.T) { installScript, err := installScriptForApp(app, &cask) require.NoError(t, err) diff --git a/server/mdm/maintainedapps/testdata/scripts/1password_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/1password_uninstall.golden.sh index b12d324a6087..2b4c225b4b02 100644 --- a/server/mdm/maintainedapps/testdata/scripts/1password_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/1password_uninstall.golden.sh @@ -9,6 +9,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -20,7 +21,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/adobe-acrobat-reader_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/adobe-acrobat-reader_uninstall.golden.sh index 7a6e702ffe3f..4827afe69bf7 100644 --- a/server/mdm/maintainedapps/testdata/scripts/adobe-acrobat-reader_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/adobe-acrobat-reader_uninstall.golden.sh @@ -47,15 +47,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -69,7 +69,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -77,7 +77,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -91,6 +91,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -102,7 +103,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/box-drive_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/box-drive_uninstall.golden.sh index 11cd1c552deb..639bceedbe25 100644 --- a/server/mdm/maintainedapps/testdata/scripts/box-drive_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/box-drive_uninstall.golden.sh @@ -47,15 +47,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -69,7 +69,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -77,7 +77,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -91,6 +91,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -102,20 +103,26 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi } +(cd /Users/$LOGGED_IN_USER; sudo -u $LOGGED_IN_USER fileproviderctl domain remove -A com.box.desktop.boxfileprovider) +(cd /Users/$LOGGED_IN_USER; sudo -u $LOGGED_IN_USER /Applications/Box.app/Contents/MacOS/fpe/streem --remove-fpe-domain-and-archive-unsynced-content Box) +(cd /Users/$LOGGED_IN_USER; sudo -u $LOGGED_IN_USER /Applications/Box.app/Contents/MacOS/fpe/streem --remove-fpe-domain-and-preserve-unsynced-content Box) +(cd /Users/$LOGGED_IN_USER; defaults delete com.box.desktop) +echo "${LOGGED_IN_USER} ALL = (root) NOPASSWD: /Library/Application\ Support/Box/uninstall_box_drive_r" >> /etc/sudoers.d/box_uninstall remove_launchctl_service 'com.box.desktop.helper' quit_application 'com.box.Box-Local-Com-Server' quit_application 'com.box.desktop' quit_application 'com.box.desktop.findersyncext' quit_application 'com.box.desktop.helper' quit_application 'com.box.desktop.ui' -sudo -u "$LOGGED_IN_USER" '/Library/Application Support/Box/uninstall_box_drive' +(cd /Users/$LOGGED_IN_USER && sudo -u "$LOGGED_IN_USER" '/Library/Application Support/Box/uninstall_box_drive') sudo pkgutil --forget 'com.box.desktop.installer.*' +rm /etc/sudoers.d/box_uninstall trash $LOGGED_IN_USER '~/.Box_*' trash $LOGGED_IN_USER '~/Library/Application Support/Box/Box' trash $LOGGED_IN_USER '~/Library/Application Support/FileProvider/com.box.desktop.boxfileprovider' diff --git a/server/mdm/maintainedapps/testdata/scripts/brave-browser_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/brave-browser_uninstall.golden.sh index c31741a1b6d6..e571aba27ccc 100644 --- a/server/mdm/maintainedapps/testdata/scripts/brave-browser_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/brave-browser_uninstall.golden.sh @@ -9,6 +9,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -20,7 +21,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/cloudflare-warp_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/cloudflare-warp_uninstall.golden.sh index 32a20bdb719b..838490f85ee1 100644 --- a/server/mdm/maintainedapps/testdata/scripts/cloudflare-warp_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/cloudflare-warp_uninstall.golden.sh @@ -47,15 +47,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -69,7 +69,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -77,7 +77,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -91,6 +91,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -102,7 +103,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/docker_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/docker_uninstall.golden.sh index 02d6d5d91052..81ac45cb938c 100644 --- a/server/mdm/maintainedapps/testdata/scripts/docker_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/docker_uninstall.golden.sh @@ -48,15 +48,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -70,7 +70,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -78,7 +78,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -92,6 +92,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -103,7 +104,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/figma_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/figma_uninstall.golden.sh index 551651b8736c..d6566f21dc5d 100644 --- a/server/mdm/maintainedapps/testdata/scripts/figma_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/figma_uninstall.golden.sh @@ -9,6 +9,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -20,7 +21,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/firefox_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/firefox_uninstall.golden.sh index b082bae00e79..bf9165523968 100644 --- a/server/mdm/maintainedapps/testdata/scripts/firefox_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/firefox_uninstall.golden.sh @@ -47,6 +47,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -58,7 +59,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/google-chrome_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/google-chrome_uninstall.golden.sh index 0d657a9b8daa..ac598a219c28 100644 --- a/server/mdm/maintainedapps/testdata/scripts/google-chrome_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/google-chrome_uninstall.golden.sh @@ -10,15 +10,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -32,7 +32,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -40,7 +40,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -54,6 +54,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -65,7 +66,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/microsoft-edge_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/microsoft-edge_uninstall.golden.sh index 31592353cc9e..3abf7683a975 100644 --- a/server/mdm/maintainedapps/testdata/scripts/microsoft-edge_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/microsoft-edge_uninstall.golden.sh @@ -9,15 +9,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -31,7 +31,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -39,7 +39,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -53,6 +53,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -64,7 +65,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/microsoft-excel_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/microsoft-excel_uninstall.golden.sh index 170c57073258..5e5f278dc724 100644 --- a/server/mdm/maintainedapps/testdata/scripts/microsoft-excel_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/microsoft-excel_uninstall.golden.sh @@ -47,15 +47,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -69,7 +69,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -77,7 +77,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -91,6 +91,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -102,7 +103,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/microsoft-teams_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/microsoft-teams_uninstall.golden.sh index c3193ccc3d45..bf360ee6e373 100644 --- a/server/mdm/maintainedapps/testdata/scripts/microsoft-teams_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/microsoft-teams_uninstall.golden.sh @@ -47,15 +47,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -69,7 +69,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -77,7 +77,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -91,6 +91,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -102,7 +103,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/microsoft-word_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/microsoft-word_uninstall.golden.sh index 312f00d1eab4..b522887ea477 100644 --- a/server/mdm/maintainedapps/testdata/scripts/microsoft-word_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/microsoft-word_uninstall.golden.sh @@ -47,15 +47,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -69,7 +69,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -77,7 +77,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -91,6 +91,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -102,7 +103,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/notion_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/notion_uninstall.golden.sh index abbe904ee983..361fe624c2ee 100644 --- a/server/mdm/maintainedapps/testdata/scripts/notion_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/notion_uninstall.golden.sh @@ -9,6 +9,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -20,7 +21,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/postman_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/postman_uninstall.golden.sh index 89e7892499c6..8e69f072e323 100644 --- a/server/mdm/maintainedapps/testdata/scripts/postman_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/postman_uninstall.golden.sh @@ -9,6 +9,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -20,7 +21,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/slack_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/slack_uninstall.golden.sh index 702aeb3a7ce5..69b539fd0960 100644 --- a/server/mdm/maintainedapps/testdata/scripts/slack_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/slack_uninstall.golden.sh @@ -47,6 +47,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -58,7 +59,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/teamviewer_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/teamviewer_uninstall.golden.sh index 6a584a8d9f86..d14846c430dc 100644 --- a/server/mdm/maintainedapps/testdata/scripts/teamviewer_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/teamviewer_uninstall.golden.sh @@ -47,15 +47,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -69,7 +69,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -77,7 +77,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -91,6 +91,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -102,7 +103,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/visual-studio-code_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/visual-studio-code_uninstall.golden.sh index 952e5141f306..c2e6c83301d1 100644 --- a/server/mdm/maintainedapps/testdata/scripts/visual-studio-code_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/visual-studio-code_uninstall.golden.sh @@ -48,15 +48,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -70,7 +70,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -78,7 +78,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -92,6 +92,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -103,7 +104,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/whatsapp_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/whatsapp_uninstall.golden.sh index 427218681d9c..dca9ca0e120a 100644 --- a/server/mdm/maintainedapps/testdata/scripts/whatsapp_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/whatsapp_uninstall.golden.sh @@ -9,6 +9,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -20,7 +21,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/server/mdm/maintainedapps/testdata/scripts/zoom_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/zoom_uninstall.golden.sh index b0a5a94fb743..d9662c0a5781 100644 --- a/server/mdm/maintainedapps/testdata/scripts/zoom_uninstall.golden.sh +++ b/server/mdm/maintainedapps/testdata/scripts/zoom_uninstall.golden.sh @@ -9,15 +9,15 @@ remove_launchctl_service() { local booleans=("true" "false") local plist_status local paths - local sudo + local should_sudo echo "Removing launchctl service ${service}" - for sudo in "${booleans[@]}"; do + for should_sudo in "${booleans[@]}"; do plist_status=$(launchctl list "${service}" 2>/dev/null) if [[ $plist_status == \{* ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo launchctl remove "${service}" else launchctl remove "${service}" @@ -31,7 +31,7 @@ remove_launchctl_service() { ) # if not using sudo, prepend the home directory to the paths - if [[ $sudo == "false" ]]; then + if [[ $should_sudo == "false" ]]; then for i in "${!paths[@]}"; do paths[i]="${HOME}${paths[i]}" done @@ -39,7 +39,7 @@ remove_launchctl_service() { for path in "${paths[@]}"; do if [[ -e "$path" ]]; then - if [[ $sudo == "true" ]]; then + if [[ $should_sudo == "true" ]]; then sudo rm -f -- "$path" else rm -f -- "$path" @@ -92,6 +92,7 @@ trash() { local logged_in_user="$1" local target_file="$2" local timestamp="$(date +%Y-%m-%d-%s)" + local rand="$(jot -r 1 0 99999)" # replace ~ with /Users/$logged_in_user if [[ "$target_file" == ~* ]]; then @@ -103,7 +104,7 @@ trash() { if [[ -e "$target_file" ]]; then echo "removing $target_file." - mv -f "$target_file" "$trash/${file_name}_${timestamp}" + mv -f "$target_file" "$trash/${file_name}_${timestamp}_${rand}" else echo "$target_file doesn't exist." fi diff --git a/website/assets/images/logo-workbrew-196x28@2x.png b/website/assets/images/logo-workbrew-196x28@2x.png new file mode 100644 index 000000000000..affa0152ae59 Binary files /dev/null and b/website/assets/images/logo-workbrew-196x28@2x.png differ diff --git a/website/views/pages/integrations.ejs b/website/views/pages/integrations.ejs index b40988616af9..b434b09bd1a1 100644 --- a/website/views/pages/integrations.ejs +++ b/website/views/pages/integrations.ejs @@ -305,6 +305,19 @@ +
+ Deliver secure software with Fleet and Workbrew. +
+