Cleaning and adding prevention scripts

This commit is contained in:
Theile
2022-09-20 09:50:54 +02:00
parent c0a850848b
commit 938a40943e
13 changed files with 42 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# Installation using Installomator with DEPNotify window
# Installomator 1st installation with DEPNotify window (auto installation at enrollment)
instance="Instance" # Name of used instance
LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1"

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# Installation using Installomator
# Installomator 1st installation (auto installation at enrollment)
instance="Instance" # Name of used instance
LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1"

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# Installation using Installomator with DEPNotify window
# Installomator 1st installation with DEPNotify window (for self Service deployment)
instance="Instance" # Name of used instance
LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1"

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# Installation using Installomator
# Installomator 1st installation (for Self Service deployment)
instance="Instance" # Name of used instance
LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1"
@@ -11,6 +11,7 @@ what=(dialog dockutil microsoftautoupdate supportapp applenyfonts applesfpro app
installomatorOptions="NOTIFY=all BLOCKING_PROCESS_ACTION=prompt_user"
# Error message to user if any occur
showError="1" # Show error message if 1 (0 if it should not be shown)
errorMessage="A problem was encountered setting up this Mac. Please contact IT."
######################################################################
@@ -51,11 +52,11 @@ errorMessage="A problem was encountered setting up this Mac. Please contact IT."
#
######################################################################
scriptVersion="9.4"
# v. 9.4 : 2022-09-14 : downloadURL can fall back on GitHub API
# v. 9.4 : 2022-09-14 : Making error message optional. downloadURL can fall back on GitHub API.
# v. 9.3 : 2022-08-29 : installomatorOptions in quotes and ignore blocking processes. Improved installation with looping if it fails, so it can try again. Improved GitHub handling. ws1 support.
# v. 9.2.2 : 2022-06-17 : installomatorOptions introduced. Check 1.1.1.1 for internet connection.
# v. 9.2.1 : 2022-05-30 : Some changes to logging
# v. 9.2 : 2022-05-19 : Built in installer for Installlomator, and display dialog if error happens. Now universal script for all supported MDMs based on LOGO variable.
# v. 9.2 : 2022-05-19 : Built in installer for Installomator, and display dialog if error happens. Now universal script for all supported MDMs based on LOGO variable.
######################################################################
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
@@ -293,8 +294,10 @@ printlog "Errors: $errorCount"
if [[ $errorCount -ne 0 ]]; then
printlog "ERROR: Display error dialog to user!"
errorMessage="${errorMessage} Total errors: $errorCount"
message="$errorMessage"
displayDialog &
if [[ $showError -eq 1 ]]; then
message="$errorMessage"
displayDialog &
fi
printlog "errorLabels: $errorLabels"
fi

View File

@@ -0,0 +1,11 @@
#!/bin/sh
# PREVENT Installomator 1st Auto-install from running
# DESCRIPTION
# Will create the file to prevent Installomator 1st Auto-install from running.
# Only for MDM solutions (like Addigy and Microsoft) that have conditions for runnning scripts and do not offer an enrollment event for runnning the script.
# By runninng this script, the file will be created on the client, that will prevent Installomator 1st Auto-install from runnning.
# This is a great help for implementing Installomator 1st Auto-install in a running solution, where the command below have to be run on currently enrolled devices, and then Installomator 1st Auto-install can be assigned to all machines, and will run only on newly enrolled devices.
/usr/bin/touch "/var/db/.Installomator1stDone"

View File

@@ -3,7 +3,7 @@
# Mark: Addigy Condition on condition file
# Install on success
conditionFile="/var/db/.Installation1stProgressDone"
conditionFile="/var/db/.Progress1stDone"
if [ -e "$conditionFile" ]; then
echo "$conditionFile exists. Exiting."
exit 1

View File

@@ -0,0 +1,11 @@
#!/bin/sh
# PREVENT Progress 1st swiftDialog from running
# DESCRIPTION
# Will create the file to prevent Progress 1st swiftDialog from running.
# Only for MDM solutions (like Addigy and Microsoft) that have conditions for runnning scripts and do not offer an enrollment event for runnning the script.
# By runninng this script, the file will be created on the client, that will prevent Progress 1st swiftDialog from runnning.
# This is a great help for implementing Progress 1st swiftDialog in a running solution, where the command below have to be run on currently enrolled devices, and then Progress 1st swiftDialog can be assigned to all machines, and will run only on newly enrolled devices.
/usr/bin/touch "/var/db/.Progress1stDone"

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# Progress 1st with swiftDialog
# Progress 1st with swiftDialog (auto installation at enrollment)
instance="Instance" # Name of used instance
LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1"
@@ -99,7 +99,7 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin
# Check before running
case $LOGO in
addigy|microsoft)
conditionFile="/var/db/.Installation1stProgressDone"
conditionFile="/var/db/.Progress1stDone"
# Addigy and Microsoft Endpoint Manager (Intune) need a check for a touched file
if [ -e "$conditionFile" ]; then
echo "$LOGO setup detected"

View File

@@ -1,5 +1,8 @@
#!/bin/sh
# Mark: Addigy Condition
# Install on success
gitusername="Installomator"
gitreponame="Installomator"
appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g')

View File

@@ -1,5 +1,8 @@
#!/bin/sh
# Mark: Addigy Condition
# Install on success
gitusername="bartreardon"
gitreponame="swiftDialog"
appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g')