mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
MDM scripts updated
This commit is contained in:
@@ -5,8 +5,28 @@ what="brave" # enter the software to install
|
||||
# To be used as a script sent out from a MDM.
|
||||
# Fill the variable "what" above with a label.
|
||||
# Script will run this label.
|
||||
LOGO="appstore" # or "addigy", "microsoft", "mosyleb", "mosylem"
|
||||
######################################################################
|
||||
# Parameters for reinstall/initial install (owner root:wheel):
|
||||
# "BLOCKING_PROCESS_ACTION=quit_kill INSTALL=force IGNORE_APP_STORE_APPS=yes SYSTEMOWNER=1"
|
||||
# Parameters for Self Service installed app:
|
||||
# "BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=all"
|
||||
# Parameters for security important apps, like browsers (run automaticaly every day):
|
||||
# "BLOCKING_PROCESS_ACTION=tell_user_then_kill"
|
||||
# Update of service apps (run automatically):
|
||||
# "BLOCKING_PROCESS_ACTION=quit_kill NOTIFY=silent"
|
||||
parameters="BLOCKING_PROCESS_ACTION=tell_user_then_kill NOTIFY=all"
|
||||
###############################################
|
||||
|
||||
# Verify that Installomator has been installed
|
||||
destFile="/usr/local/Installomator/Installomator.sh"
|
||||
if [ ! -e "${destFile}" ]; then
|
||||
echo "Installomator not found here:"
|
||||
echo "${destFile}"
|
||||
echo "Exiting."
|
||||
exit 99
|
||||
fi
|
||||
|
||||
# No sleeping
|
||||
/usr/bin/caffeinate -d -i -m -u &
|
||||
caffeinatepid=$!
|
||||
@@ -16,18 +36,14 @@ caffexit () {
|
||||
exit $1
|
||||
}
|
||||
|
||||
# Verify that Installomator has been installed
|
||||
destFile="/usr/local/Installomator/Installomator.sh"
|
||||
if [ ! -e "${destFile}" ]; then
|
||||
echo "Installomator not found here:"
|
||||
echo "${destFile}"
|
||||
echo "Exiting."
|
||||
caffexit 99
|
||||
fi
|
||||
|
||||
${destFile} ${what} LOGO=mosyleb BLOCKING_PROCESS_ACTION=tell_user #NOTIFY=all #INSTALL=force
|
||||
if [ $? != 0 ]; then
|
||||
# This is currently not working in Mosyle, that will ignore script errors. Please request support for this from Mosyle!
|
||||
cmdOutput="$(${destFile} ${what} LOGO=$LOGO $parameters LOGGING=WARN || true)"
|
||||
# Check result
|
||||
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
||||
if [[ ${exitStatus} -ne 0 ]] ; then
|
||||
echo -e "Error installing ${what}. Exit code ${exitStatus}"
|
||||
#echo "$cmdOutput"
|
||||
errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
||||
echo "$errorOutput"
|
||||
echo "Error installing ${what}. Exit code $?"
|
||||
caffexit $?
|
||||
fi
|
||||
|
||||
@@ -1,11 +1,31 @@
|
||||
#!/bin/zsh
|
||||
# Installation using Installomator
|
||||
what="microsoftteams microsoftyammer firefox bravebrowser cyberduck vlc signal" # enter the software to install separated with spaces
|
||||
whatList="microsoftteams microsoftyammer firefox bravebrowser cyberduck vlc signal" # enter the software to install separated with spaces
|
||||
|
||||
# To be used as a script sent out from a MDM.
|
||||
# Fill the variable "what" above with labels separated by space " ".
|
||||
# Fill the variable "whatList" above with labels separated by space " ".
|
||||
# Script will loop through these labels.
|
||||
LOGO="appstore" # or "addigy", "microsoft", "mosyleb", "mosylem"
|
||||
######################################################################
|
||||
# Parameters for reinstall/initial install (owner root:wheel):
|
||||
# "BLOCKING_PROCESS_ACTION=quit_kill INSTALL=force IGNORE_APP_STORE_APPS=yes SYSTEMOWNER=1"
|
||||
# Parameters for Self Service installed app:
|
||||
# "BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=all"
|
||||
# Parameters for security important apps, like browsers (run automaticaly every day):
|
||||
# "BLOCKING_PROCESS_ACTION=tell_user_then_kill"
|
||||
# Update of service apps (run automatically):
|
||||
# "BLOCKING_PROCESS_ACTION=quit_kill NOTIFY=silent"
|
||||
parameters="BLOCKING_PROCESS_ACTION=tell_user NOTIFY=all"
|
||||
######################################################################
|
||||
|
||||
# Verify that Installomator has been installed
|
||||
destFile="/usr/local/Installomator/Installomator.sh"
|
||||
if [ ! -e "${destFile}" ]; then
|
||||
echo "Installomator not found here:"
|
||||
echo "${destFile}"
|
||||
echo "Exiting."
|
||||
exit 99
|
||||
fi
|
||||
|
||||
# No sleeping
|
||||
/usr/bin/caffeinate -d -i -m -u &
|
||||
@@ -19,21 +39,17 @@ caffexit () {
|
||||
# Count errors
|
||||
errorCount=0
|
||||
|
||||
# Verify that Installomator has been installed
|
||||
destFile="/usr/local/Installomator/Installomator.sh"
|
||||
if [ ! -e "${destFile}" ]; then
|
||||
echo "Installomator not found here:"
|
||||
echo "${destFile}"
|
||||
echo "Exiting."
|
||||
caffexit 99
|
||||
fi
|
||||
|
||||
for item in $what; do
|
||||
#echo $item
|
||||
${destFile} ${item} LOGO=mosyleb BLOCKING_PROCESS_ACTION=tell_user #NOTIFY=all #INSTALL=force
|
||||
if [ $? != 0 ]; then
|
||||
# This is currently not working in Mosyle, that will ignore script errors. Please request support for this from Mosyle!
|
||||
echo "[$(DATE)] Error installing ${item}. Exit code $?"
|
||||
for what in $whatList; do
|
||||
#echo $what
|
||||
# Install software using Installomator
|
||||
cmdOutput="$(${destFile} ${what} LOGO=$LOGO $parameters LOGGING=WARN || true)"
|
||||
# Check result
|
||||
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
||||
if [[ ${exitStatus} -ne 0 ]] ; then
|
||||
echo -e "Error installing ${what}. Exit code ${exitStatus}"
|
||||
#echo "$cmdOutput"
|
||||
errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
||||
echo "$errorOutput"
|
||||
let errorCount++
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
#!/bin/bash
|
||||
# Updating Installomator
|
||||
# Usefull to push out after deployment if earlier version was deployed in DEP profile
|
||||
# Currently script uses valuesfromarguments as a label is not included before next release, so this can be used to install to version 0.7
|
||||
|
||||
what="installomator" # enter the software to install
|
||||
LOGO="appstore" # or "addigy", "microsoft", "mosyleb", "mosylem"
|
||||
|
||||
# Verify that Installomator has been installed
|
||||
destFile="/usr/local/Installomator/Installomator.sh"
|
||||
if [ ! -e "${destFile}" ]; then
|
||||
echo "Installomator not found here:"
|
||||
echo "${destFile}"
|
||||
echo "Exiting."
|
||||
exit 99
|
||||
fi
|
||||
|
||||
# No sleeping
|
||||
/usr/bin/caffeinate -d -i -m -u &
|
||||
@@ -14,30 +23,19 @@ caffexit () {
|
||||
exit $1
|
||||
}
|
||||
|
||||
# Verify that Installomator has been installed
|
||||
destFile="/usr/local/Installomator/Installomator.sh"
|
||||
if [ ! -e "${destFile}" ]; then
|
||||
echo "Installomator not found here:"
|
||||
echo "${destFile}"
|
||||
echo "Exiting."
|
||||
caffexit 99
|
||||
fi
|
||||
# Install software using Installomator
|
||||
cmdOutput="$(${destFile} ${what} LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent LOGGING=req || true)"
|
||||
|
||||
${destFile} valuesfromarguments\
|
||||
name=Installomator \
|
||||
type=pkg \
|
||||
packageID=com.scriptingosx.Installomator \
|
||||
downloadURL=https://github.com/Installomator/Installomator/releases/download/v0.7release/Installomator-0.7.0.pkg \
|
||||
appNewVersion=0.7 \
|
||||
expectedTeamID=JME5BW3F3R \
|
||||
BLOCKING_PROCESS_ACTION=ignore \
|
||||
NOTIFY=silent
|
||||
|
||||
# ${destFile} ${what} BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent
|
||||
if [ $? != 0 ]; then
|
||||
# This is currently not working in Mosyle, that will ignore script errors. Please request support for this from Mosyle!
|
||||
echo "Error installing ${what}. Exit code $?"
|
||||
caffexit $?
|
||||
# Check result
|
||||
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
||||
if [[ ${exitStatus} -eq 0 ]] ; then
|
||||
echo -e "${what} succesfully installed.\n"
|
||||
else
|
||||
echo -e "Error installing ${what}. Exit code ${exitStatus}\n"
|
||||
#echo "$cmdOutput"
|
||||
errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
||||
echo "$errorOutput"
|
||||
caffexit $exitStatus
|
||||
fi
|
||||
|
||||
echo "[$(DATE)][LOG-END]"
|
||||
|
||||
@@ -5,15 +5,34 @@
|
||||
|
||||
# Mark: Installation script
|
||||
# Just click “Add” to autogenerate the installer script line by clicking the “Add”-button next to the Installer PKG, replace with first line below
|
||||
/usr/sbin/installer -pkg "/Library/Addigy/ansible/packages/Installomator (0.7.0)/Installomator-0.7.0.pkg" -target /
|
||||
/usr/sbin/installer -pkg "/Library/Addigy/ansible/packages/Installomator (9.1.0)/Installomator-9.1.pkg" -target /
|
||||
|
||||
# Installation using Installomator
|
||||
what="supportapp xink textmate microsoftedge wwdc keka vlc " # enter the software to installed separated with spaces
|
||||
whatList="supportapp xink textmate microsoftedge wwdc keka vlc " # enter the software to installed separated with spaces
|
||||
|
||||
# To be used as a script sent out from a MDM.
|
||||
# Fill the variable "what" above with labels separated by space " ".
|
||||
# Fill the variable "whatList" above with labels separated by space " ".
|
||||
# Script will loop through these labels and exit with number of errors.
|
||||
######################################################################
|
||||
# Parameters for reinstall/initial install (owner root:wheel):
|
||||
# "BLOCKING_PROCESS_ACTION=quit_kill INSTALL=force IGNORE_APP_STORE_APPS=yes SYSTEMOWNER=1"
|
||||
# Parameters for Self Service installed app:
|
||||
# "BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=all"
|
||||
# Parameters for security important apps, like browsers (run automaticaly every day):
|
||||
# "BLOCKING_PROCESS_ACTION=tell_user_then_kill"
|
||||
# Update of service apps (run automatically):
|
||||
# "BLOCKING_PROCESS_ACTION=quit_kill NOTIFY=silent"
|
||||
parameters="BLOCKING_PROCESS_ACTION=quit_kill INSTALL=force IGNORE_APP_STORE_APPS=yes"
|
||||
######################################################################
|
||||
|
||||
# Verify that Installomator has been installed
|
||||
destFile="/usr/local/Installomator/Installomator.sh"
|
||||
if [ ! -e "${destFile}" ]; then
|
||||
echo "Installomator not found here:"
|
||||
echo "${destFile}"
|
||||
echo "Exiting."
|
||||
exit 99
|
||||
fi
|
||||
|
||||
# No sleeping
|
||||
/usr/bin/caffeinate -d -i -m -u &
|
||||
@@ -27,21 +46,17 @@ caffexit () {
|
||||
# Count errors
|
||||
errorCount=0
|
||||
|
||||
# Verify that Installomator has been installed
|
||||
destFile="/usr/local/Installomator/Installomator.sh"
|
||||
if [ ! -e "${destFile}" ]; then
|
||||
echo "Installomator not found here:"
|
||||
echo "${destFile}"
|
||||
echo "Exiting."
|
||||
caffexit 99
|
||||
fi
|
||||
|
||||
for item in $what; do
|
||||
#echo $item
|
||||
${destFile} ${item} LOGO=addigy NOTIFY=silent BLOCKING_PROCESS_ACTION=quit_kill #INSTALL=force
|
||||
if [ $? != 0 ]; then
|
||||
# Error handling
|
||||
echo "[$(DATE)] Error installing ${item}. Exit code $?"
|
||||
for what in $whatList; do
|
||||
#echo $what
|
||||
# Install software using Installomator
|
||||
cmdOutput="$(${destFile} ${what} LOGO=addigy $parameters || true)"
|
||||
# Check result
|
||||
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
||||
if [[ ${exitStatus} -ne 0 ]] ; then
|
||||
echo -e "Error installing ${what}. Exit code ${exitStatus}"
|
||||
#echo "$cmdOutput"
|
||||
errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
||||
echo "$errorOutput"
|
||||
let errorCount++
|
||||
fi
|
||||
done
|
||||
@@ -56,7 +71,7 @@ caffexit $errorCount
|
||||
# Install on success
|
||||
# Remember to fill out the correct “TARGET_VERSION” and “PKG_ID”, and click "Install on succes".
|
||||
PKG_ID="com.scriptingosx.Installomator"
|
||||
TARGET_VERSION="8.0"
|
||||
TARGET_VERSION="9.1"
|
||||
|
||||
vercomp () {
|
||||
if [[ $1 == $2 ]]; then
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
PKG_ID="com.scriptingosx.Installomator"
|
||||
TARGET_VERSION="8.0"
|
||||
TARGET_VERSION="9.1"
|
||||
URLDOWNLOAD="%MosyleCDNFile:blah-blah-blah%"
|
||||
######################################################################
|
||||
# Installation using Installomator (enter the software to install separated with spaces in the "what"-variable)
|
||||
what="handbrake theunarchiver microsoftoffice365"
|
||||
# Installation using Installomator (enter the software to install separated with spaces in the "whatList"-variable)
|
||||
whatList="handbrake theunarchiver microsoftoffice365"
|
||||
# Covered by Mosyle Catalog: "brave firefox googlechrome microsoftedge microsoftteams signal sublimetext vlc webex zoom" among others
|
||||
LOGO="mosyleb" # or "mosylem"
|
||||
######################################################################
|
||||
|
||||
## Mark: Code here
|
||||
@@ -56,12 +57,17 @@ if [ ! -e "${destFile}" ]; then
|
||||
caffexit 99
|
||||
fi
|
||||
|
||||
for item in $what; do
|
||||
for what in $whatList; do
|
||||
#echo $item
|
||||
${destFile} ${item} LOGO=mosyle NOTIFY=all BLOCKING_PROCESS_ACTION=tell_user #NOTIFY=silent BLOCKING_PROCESS_ACTION=quit_kill #INSTALL=force
|
||||
if [ $? != 0 ]; then
|
||||
# Error handling
|
||||
echo "[$(DATE)] Error installing ${item}. Exit code $?"
|
||||
# Install software using Installomator
|
||||
cmdOutput="$(${destFile} ${what} LOGO=$LOGO NOTIFY=all BLOCKING_PROCESS_ACTION=tell_user || true)" # NOTIFY=silent BLOCKING_PROCESS_ACTION=quit_kill INSTALL=force
|
||||
# Check result
|
||||
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
||||
if [[ ${exitStatus} -ne 0 ]] ; then
|
||||
echo "Error installing ${what}. Exit code ${exitStatus}"
|
||||
#echo "$cmdOutput"
|
||||
errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
||||
echo "$errorOutput"
|
||||
let errorCount++
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
#!/bin/bash
|
||||
# Software
|
||||
|
||||
# Installation using Installomator
|
||||
# Example of installing software using valuesfromarguments to install a custom software
|
||||
|
||||
what="valuesfromarguments" # enter the software to install
|
||||
LOGO="appstore" # or "addigy", "microsoft", "mosyleb", "mosylem"
|
||||
###############################################
|
||||
|
||||
# Verify that Installomator has been installed
|
||||
destFile="/usr/local/Installomator/Installomator.sh"
|
||||
if [ ! -e "${destFile}" ]; then
|
||||
echo "Installomator not found here:"
|
||||
echo "${destFile}"
|
||||
echo "Exiting."
|
||||
exit 99
|
||||
fi
|
||||
|
||||
# No sleeping
|
||||
/usr/bin/caffeinate -d -i -m -u &
|
||||
@@ -13,29 +25,31 @@ caffexit () {
|
||||
exit $1
|
||||
}
|
||||
|
||||
# Verify that Installomator has been installed
|
||||
destFile="/usr/local/Installomator/Installomator.sh"
|
||||
if [ ! -e "${destFile}" ]; then
|
||||
echo "Installomator not found here:"
|
||||
echo "${destFile}"
|
||||
echo "Exiting."
|
||||
caffexit 99
|
||||
fi
|
||||
# Variables to calculate
|
||||
downloadURL="https://craft-assets.invisionapp.com/CraftManager/production/CraftManager.zip"
|
||||
appNewVersion=$(curl -fs https://craft-assets.invisionapp.com/CraftManager/production/appcast.xml | xpath -e '//rss/channel/item[1]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f2)
|
||||
|
||||
${destFile} valuesfromarguments \
|
||||
name=\"Zoho\ WorkDrive\" \
|
||||
type=dmg \
|
||||
downloadURL=https://files-accl.zohopublic.com/public/wdbin/download/46f971e4fc4a32b68ad5d7dade38a7d2 \
|
||||
appNewVersion=2.6.25 \
|
||||
expectedTeamID=TZ824L8Y37 \
|
||||
BLOCKING_PROCESS_ACTION=quit \
|
||||
NOTIFY=all
|
||||
# Install software using Installomator
|
||||
cmdOutput="$(${destFile} valuesfromarguments LOGO=$LOGO \
|
||||
name=CraftManager \
|
||||
type=zip \
|
||||
downloadURL=$downloadURL \
|
||||
appNewVersion=$appNewVersion \
|
||||
expectedTeamID=VRXQSNCL5W \
|
||||
BLOCKING_PROCESS_ACTION=prompt_user \
|
||||
LOGGING=REQ \
|
||||
NOTIFY=all || true)"
|
||||
|
||||
# ${destFile} ${what} BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent
|
||||
if [ $? != 0 ]; then
|
||||
# This is currently not working in Mosyle, that will ignore script errors. Please request support for this from Mosyle!
|
||||
echo "Error installing ${what}. Exit code $?"
|
||||
caffexit $?
|
||||
# Check result
|
||||
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
||||
if [[ ${exitStatus} -eq 0 ]] ; then
|
||||
echo -e "${what} succesfully installed.\n"
|
||||
else
|
||||
echo -e "Error installing ${what}. Exit code ${exitStatus}\n"
|
||||
#printlog "$cmdOutput"
|
||||
errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
||||
echo "$errorOutput"
|
||||
caffexit $exitStatus
|
||||
fi
|
||||
|
||||
echo "[$(DATE)][LOG-END]"
|
||||
|
||||
Reference in New Issue
Block a user