mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
Cleaning and adding prevention scripts
This commit is contained in:
@@ -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"
|
||||
@@ -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"
|
||||
@@ -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"
|
||||
@@ -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"
|
||||
if [[ $showError -eq 1 ]]; then
|
||||
message="$errorMessage"
|
||||
displayDialog &
|
||||
fi
|
||||
printlog "errorLabels: $errorLabels"
|
||||
fi
|
||||
|
||||
11
MDM/Installomator 1st prevention.sh
Normal file
11
MDM/Installomator 1st prevention.sh
Normal 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"
|
||||
@@ -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
|
||||
11
MDM/Progress 1st swiftDialog prevention.sh
Normal file
11
MDM/Progress 1st swiftDialog prevention.sh
Normal 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"
|
||||
@@ -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"
|
||||
@@ -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')
|
||||
@@ -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')
|
||||
Reference in New Issue
Block a user