From 66133a5520f4d37b676e9b720d9700d5aa93c6ed Mon Sep 17 00:00:00 2001 From: Chriscodinglife Date: Tue, 28 Jun 2022 15:18:41 -0400 Subject: [PATCH 01/96] Added the Fujifilm label for future dslr webcam fans --- fragments/labels/fujifilmwebcam.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/fujifilmwebcam.sh diff --git a/fragments/labels/fujifilmwebcam.sh b/fragments/labels/fujifilmwebcam.sh new file mode 100644 index 0000000..994d03a --- /dev/null +++ b/fragments/labels/fujifilmwebcam.sh @@ -0,0 +1,7 @@ +fujifilmwebcam) + name="FUJIFILM X Webcam 2" + type="pkg" + downloadURL=$(curl -fs "https://fujifilm-x.com/en-us/support/download/software/x-webcam/" | grep "https.*pkg" | sed -E 's/.*(https:\/\/dl.fujifilm-x\.com\/support\/software\/.*\.pkg[^\<]).*/\1/g' | sed -e 's/^"//' -e 's/"$//') + appNewVersion=$( echo “${downloadURL}” | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g' ) + expectedTeamID="34LRP8AV2M" + ;; From a84b14234e02395cf80dda401d106c08a82b1051 Mon Sep 17 00:00:00 2001 From: Chriscodinglife Date: Tue, 28 Jun 2022 16:36:41 -0400 Subject: [PATCH 02/96] Corrected appnewversion variable with sed grabbing the version number displayed in the package file --- fragments/labels/fujifilmwebcam.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/labels/fujifilmwebcam.sh b/fragments/labels/fujifilmwebcam.sh index 994d03a..ebeaf03 100644 --- a/fragments/labels/fujifilmwebcam.sh +++ b/fragments/labels/fujifilmwebcam.sh @@ -2,6 +2,6 @@ fujifilmwebcam) name="FUJIFILM X Webcam 2" type="pkg" downloadURL=$(curl -fs "https://fujifilm-x.com/en-us/support/download/software/x-webcam/" | grep "https.*pkg" | sed -E 's/.*(https:\/\/dl.fujifilm-x\.com\/support\/software\/.*\.pkg[^\<]).*/\1/g' | sed -e 's/^"//' -e 's/"$//') - appNewVersion=$( echo “${downloadURL}” | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g' ) + appNewVersion=$( echo “${downloadURL}” | sed -E 's/.*XWebcamIns([0-9]*).*/\1/g' ) expectedTeamID="34LRP8AV2M" ;; From 3fd88f62075846647e107c2f26965decd68385f4 Mon Sep 17 00:00:00 2001 From: Chriscodinglife Date: Tue, 28 Jun 2022 16:43:41 -0400 Subject: [PATCH 03/96] Corrected the version grab one more time --- fragments/labels/fujifilmwebcam.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/labels/fujifilmwebcam.sh b/fragments/labels/fujifilmwebcam.sh index ebeaf03..aca799d 100644 --- a/fragments/labels/fujifilmwebcam.sh +++ b/fragments/labels/fujifilmwebcam.sh @@ -2,6 +2,6 @@ fujifilmwebcam) name="FUJIFILM X Webcam 2" type="pkg" downloadURL=$(curl -fs "https://fujifilm-x.com/en-us/support/download/software/x-webcam/" | grep "https.*pkg" | sed -E 's/.*(https:\/\/dl.fujifilm-x\.com\/support\/software\/.*\.pkg[^\<]).*/\1/g' | sed -e 's/^"//' -e 's/"$//') - appNewVersion=$( echo “${downloadURL}” | sed -E 's/.*XWebcamIns([0-9]*).*/\1/g' ) + appNewVersion=$( echo “${downloadURL}” | sed -E 's/.*XWebcamIns([0-9]*).*/\1/g' | sed -E 's/([0-9])([0-9]).*/\1\.\2/g' expectedTeamID="34LRP8AV2M" ;; From 811680083512813a13e673ff5a7db96957a0321b Mon Sep 17 00:00:00 2001 From: Chriscodinglife Date: Tue, 28 Jun 2022 16:45:15 -0400 Subject: [PATCH 04/96] Added the much needed ending ) --- fragments/labels/fujifilmwebcam.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/labels/fujifilmwebcam.sh b/fragments/labels/fujifilmwebcam.sh index aca799d..26d29a2 100644 --- a/fragments/labels/fujifilmwebcam.sh +++ b/fragments/labels/fujifilmwebcam.sh @@ -2,6 +2,6 @@ fujifilmwebcam) name="FUJIFILM X Webcam 2" type="pkg" downloadURL=$(curl -fs "https://fujifilm-x.com/en-us/support/download/software/x-webcam/" | grep "https.*pkg" | sed -E 's/.*(https:\/\/dl.fujifilm-x\.com\/support\/software\/.*\.pkg[^\<]).*/\1/g' | sed -e 's/^"//' -e 's/"$//') - appNewVersion=$( echo “${downloadURL}” | sed -E 's/.*XWebcamIns([0-9]*).*/\1/g' | sed -E 's/([0-9])([0-9]).*/\1\.\2/g' + appNewVersion=$( echo “${downloadURL}” | sed -E 's/.*XWebcamIns([0-9]*).*/\1/g' | sed -E 's/([0-9])([0-9]).*/\1\.\2/g') expectedTeamID="34LRP8AV2M" ;; From 09a34c05b7a41ee6b8f04307c6a6bf6db7de5dc2 Mon Sep 17 00:00:00 2001 From: duongt01 <92530753+duongt01@users.noreply.github.com> Date: Tue, 28 Jun 2022 16:10:29 -0500 Subject: [PATCH 05/96] New Label: Fellow --- fragments/labels/fellow | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/fellow diff --git a/fragments/labels/fellow b/fragments/labels/fellow new file mode 100644 index 0000000..9fddce1 --- /dev/null +++ b/fragments/labels/fellow @@ -0,0 +1,7 @@ +fellow) + name="Fellow" + type="dmg" + downloadURL="https://fellow.app/desktop/download/darwin/latest/" + appNewVersion="$(curl -fsIL "${downloadURL}" | grep -i ^location | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/' | head -1)" + expectedTeamID="2NF46HY8D8" + ;; From 6a2da9f55c9abd04943fa7022409ead4c97b0362 Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Mon, 4 Jul 2022 12:49:29 +0200 Subject: [PATCH 06/96] Update libreoffice.sh Changed appNewVersion check, so that no download is started if the same version of the software is installed Changed download url --- fragments/labels/libreoffice.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fragments/labels/libreoffice.sh b/fragments/labels/libreoffice.sh index 2befca5..8f43339 100644 --- a/fragments/labels/libreoffice.sh +++ b/fragments/labels/libreoffice.sh @@ -2,11 +2,14 @@ libreoffice) name="LibreOffice" type="dmg" if [[ $(arch) == "arm64" ]]; then - downloadURL="https://download.documentfoundation.org/libreoffice/stable/$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)/mac/aarch64/LibreOffice_$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)_MacOS_aarch64.dmg" + releaseURL="https://downloadarchive.documentfoundation.org/libreoffice/old/latest/mac/aarch64/" + appNewVersion=$(curl -sf $releaseURL | grep -m 1 "_MacOS_aarch64.dmg" | sed "s|.*LibreOffice_\(.*\)_MacOS.*|\\1|") + downloadURL="https://downloadarchive.documentfoundation.org/libreoffice/old/latest/mac/aarch64/LibreOffice_"$appNewVersion"_MacOS_aarch64.dmg" elif [[ $(arch) == "i386" ]]; then - downloadURL="https://download.documentfoundation.org/libreoffice/stable/$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)/mac/x86_64/LibreOffice_$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)_MacOS_x86-64.dmg" + releaseURL="https://downloadarchive.documentfoundation.org/libreoffice/old/latest/mac/x86_64/" + appNewVersion=$(curl -sf $releaseURL | grep -m 1 "_MacOS_x86-64.dmg" | sed "s|.*LibreOffice_\(.*\)_MacOS.*|\\1|") + downloadURL="https://downloadarchive.documentfoundation.org/libreoffice/old/latest/mac/x86_64/LibreOffice_"$appNewVersion"_MacOS_x86-64.dmg" fi - appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g' ) expectedTeamID="7P5S3ZLCN7" blockingProcesses=( soffice ) ;; From 05816942ccc3ffdaa46dac28e3cb4296ea19dabd Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Mon, 4 Jul 2022 13:15:22 +0200 Subject: [PATCH 07/96] New Label: Parallels Client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Access Windows Applications, Desktops, or Data on Any Device Parallels® Client is a lightweight software that enables end-users to securely access virtual applications and desktops from Windows, Mac, Linux, iOS/iPadOS, Android, Google Chromebook and any HTML5 web browser." ./assemble.sh -l /Desktop/Mosyle/Resources/InstallomatorLabels rasclient NOTIFY=silent DEBUG=0 Password: 2022-07-04 12:59:53 : WARN : rasclient : setting variable from argument NOTIFY=silent 2022-07-04 12:59:53 : WARN : rasclient : setting variable from argument DEBUG=0 2022-07-04 12:59:53 : REQ : rasclient : ################## Start Installomator v. 10.0beta, date 2022-07-04 2022-07-04 12:59:53 : INFO : rasclient : ################## Version: 10.0beta 2022-07-04 12:59:53 : INFO : rasclient : ################## Date: 2022-07-04 2022-07-04 12:59:53 : INFO : rasclient : ################## rasclient 2022-07-04 12:59:53 : INFO : rasclient : BLOCKING_PROCESS_ACTION=tell_user 2022-07-04 12:59:53 : INFO : rasclient : NOTIFY=silent 2022-07-04 12:59:53 : INFO : rasclient : LOGGING=INFO 2022-07-04 12:59:53 : INFO : rasclient : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-07-04 12:59:53 : INFO : rasclient : Label type: pkg 2022-07-04 12:59:53 : INFO : rasclient : archiveName: Parallels Client.pkg 2022-07-04 12:59:53 : INFO : rasclient : no blocking processes defined, using Parallels Client as default 2022-07-04 12:59:53 : INFO : rasclient : App(s) found: /Applications/Parallels Client.app 2022-07-04 12:59:53 : INFO : rasclient : found app at /Applications/Parallels Client.app, version 18.3.22907, on versionKey CFBundleShortVersionString 2022-07-04 12:59:53 : INFO : rasclient : appversion: 18.3.22907 2022-07-04 12:59:53 : INFO : rasclient : Latest version of Parallels Client is 18.3.1.22907 2022-07-04 12:59:53 : REQ : rasclient : Downloading https://download.parallels.com/ras/v18/18.3.1.22907/RasClient-Mac-Notarized-18.3.1-22907.pkg to Parallels Client.pkg 2022-07-04 12:59:55 : REQ : rasclient : no more blocking processes, continue with update 2022-07-04 12:59:55 : REQ : rasclient : Installing Parallels Client 2022-07-04 12:59:55 : INFO : rasclient : Verifying: Parallels Client.pkg 2022-07-04 12:59:55 : INFO : rasclient : Team ID: 4C6364ACXT (expected: 4C6364ACXT ) 2022-07-04 12:59:55 : INFO : rasclient : Installing Parallels Client.pkg to / 2022-07-04 13:00:02 : INFO : rasclient : Finishing... 2022-07-04 13:00:12 : INFO : rasclient : App(s) found: /Applications/Parallels Client.app 2022-07-04 13:00:12 : INFO : rasclient : found app at /Applications/Parallels Client.app, version 18.3.22907, on versionKey CFBundleShortVersionString 2022-07-04 13:00:12 : REQ : rasclient : Installed Parallels Client, version 18.3.22907 2022-07-04 13:00:12 : INFO : rasclient : App not closed, so no reopen. 2022-07-04 13:00:12 : REQ : rasclient : All done! 2022-07-04 13:00:12 : REQ : rasclient : ################## End Installomator, exit code 0 --- fragments/labels/rasclient.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/rasclient.sh diff --git a/fragments/labels/rasclient.sh b/fragments/labels/rasclient.sh new file mode 100644 index 0000000..20d10dd --- /dev/null +++ b/fragments/labels/rasclient.sh @@ -0,0 +1,7 @@ +rasclient) + name="Parallels Client" + type="pkg" + appNewVersion=$(curl -sf "https://download.parallels.com/ras/v18/RAS%20Client%20for%20Mac%20Changelog.txt" | grep -m 1 "Parallels Client for Mac Version" | sed "s|.*Version \(.*\) -.*|\\1|" | sed 's/ /./g' | sed 's/[^0-9.]//g') + downloadURL=$(appMajorVersion=`sed 's/\..*//' <<< $appNewVersion` && appHyphenVersion=`curl -sf "https://download.parallels.com/ras/v18/RAS%20Client%20for%20Mac%20Changelog.txt" | grep -m 1 "Parallels Client for Mac Version" | sed "s|.*Version \(.*\) -.*|\\1|" | sed 's/ /-/g' | sed 's/[^0-9.-]//g'` && echo https://download.parallels.com/ras/v"$appMajorVersion"/"$appNewVersion"/RasClient-Mac-Notarized-"$appHyphenVersion".pkg) + expectedTeamID="4C6364ACXT" + ;; From 02946d88c8ed298496268cae5f65162613e0b03e Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Mon, 4 Jul 2022 13:23:03 +0200 Subject: [PATCH 08/96] New Label: Java SE Development Kit 18 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ./assemble.sh -l /Desktop/Mosyle/Resources/InstallomatorLabels jdk18 2022-07-04 13:21:27 : REQ : jdk18 : ################## Start Installomator v. 10.0beta, date 2022-07-04 2022-07-04 13:21:27 : INFO : jdk18 : ################## Version: 10.0beta 2022-07-04 13:21:27 : INFO : jdk18 : ################## Date: 2022-07-04 2022-07-04 13:21:27 : INFO : jdk18 : ################## jdk18 2022-07-04 13:21:27 : DEBUG : jdk18 : DEBUG mode 1 enabled. 2022-07-04 13:21:27 : INFO : jdk18 : BLOCKING_PROCESS_ACTION=tell_user 2022-07-04 13:21:27 : INFO : jdk18 : NOTIFY=success 2022-07-04 13:21:27 : INFO : jdk18 : LOGGING=DEBUG 2022-07-04 13:21:28 : INFO : jdk18 : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-07-04 13:21:28 : INFO : jdk18 : Label type: pkgInDmg 2022-07-04 13:21:28 : INFO : jdk18 : archiveName: Java SE Development Kit 18.dmg 2022-07-04 13:21:28 : INFO : jdk18 : no blocking processes defined, using Java SE Development Kit 18 as default 2022-07-04 13:21:28 : DEBUG : jdk18 : Changing directory to /Users/savvas/Desktop/Mosyle/Resources/Installomator-main original/build 2022-07-04 13:21:28 : INFO : jdk18 : Custom App Version detection is used, found 18.0.1.1 2022-07-04 13:21:28 : INFO : jdk18 : appversion: 18.0.1.1 2022-07-04 13:21:28 : INFO : jdk18 : Latest version of Java SE Development Kit 18 is 18.0.1.1 2022-07-04 13:21:28 : WARN : jdk18 : DEBUG mode 1 enabled, not exiting, but there is no new version of app. 2022-07-04 13:21:28 : REQ : jdk18 : Downloading https://download.oracle.com/java/18/latest/jdk-18_macos-x64_bin.dmg to Java SE Development Kit 18.dmg 2022-07-04 13:21:53 : DEBUG : jdk18 : File list: -rw-r--r-- 1 savvas staff 170M 4 Jul 13:21 Java SE Development Kit 18.dmg 2022-07-04 13:21:53 : DEBUG : jdk18 : File type: Java SE Development Kit 18.dmg: zlib compressed data 2022-07-04 13:21:53 : DEBUG : jdk18 : curl output was: * Trying 104.76.200.85:443... * Connected to download.oracle.com (104.76.200.85) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (OUT), TLS handshake, Client hello (1): } [324 bytes data] * (304) (IN), TLS handshake, Server hello (2): { [122 bytes data] * (304) (IN), TLS handshake, Unknown (8): { [35 bytes data] * (304) (IN), TLS handshake, Certificate (11): { [2926 bytes data] * (304) (IN), TLS handshake, CERT verify (15): { [80 bytes data] * (304) (IN), TLS handshake, Finished (20): { [52 bytes data] * (304) (OUT), TLS handshake, Finished (20): } [52 bytes data] * SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384 * ALPN, server accepted to use http/1.1 * Server certificate: * subject: C=US; ST=California; L=Redwood City; O=Oracle Corporation; CN=download.oracle.com * start date: Sep 13 00:00:00 2021 GMT * expire date: Sep 13 23:59:59 2022 GMT * subjectAltName: host "download.oracle.com" matched cert's "download.oracle.com" * issuer: C=US; O=DigiCert Inc; CN=DigiCert SHA2 Secure Server CA * SSL certificate verify ok. > GET /java/18/latest/jdk-18_macos-x64_bin.dmg HTTP/1.1 > Host: download.oracle.com > User-Agent: curl/7.79.1 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Accept-Ranges: bytes < Content-Type: application/octet-stream < Server: AkamaiNetStorage < Last-Modified: Tue, 26 Apr 2022 18:40:47 GMT < ETag: "a5314d086c18af3e93121e11fc25f5af:1650998873.170204" < Content-Length: 178108545 < Date: Mon, 04 Jul 2022 11:21:28 GMT < Connection: keep-alive < { [16083 bytes data] * Connection #0 to host download.oracle.com left intact 2022-07-04 13:21:53 : DEBUG : jdk18 : DEBUG mode 1, not checking for blocking processes 2022-07-04 13:21:53 : REQ : jdk18 : Installing Java SE Development Kit 18 2022-07-04 13:21:53 : INFO : jdk18 : Mounting /Users/savvas/Desktop/Mosyle/Resources/Installomator-main original/build/Java SE Development Kit 18.dmg 2022-07-04 13:21:56 : DEBUG : jdk18 : Debugging enabled, dmgmount output was: Prüfsumme für Protective Master Boot Record (MBR : 0) berechnen … Protective Master Boot Record (MBR :: Die überprüfte CRC32-Prüfsumme ist $A63E199D Prüfsumme für GPT Header (Primary GPT Header : 1) berechnen … GPT Header (Primary GPT Header : 1): Die überprüfte CRC32-Prüfsumme ist $4CAA2C48 Prüfsumme für GPT Partition Data (Primary GPT Table : 2) berechnen … GPT Partition Data (Primary GPT Tabl: Die überprüfte CRC32-Prüfsumme ist $D15A79FE Prüfsumme für (Apple_Free : 3) berechnen … (Apple_Free : 3): Die überprüfte CRC32-Prüfsumme ist $00000000 Prüfsumme für disk image (Apple_HFS : 4) berechnen … disk image (Apple_HFS : 4): Die überprüfte CRC32-Prüfsumme ist $0F56211E Prüfsumme für (Apple_Free : 5) berechnen … (Apple_Free : 5): Die überprüfte CRC32-Prüfsumme ist $00000000 Prüfsumme für GPT Partition Data (Backup GPT Table : 6) berechnen … GPT Partition Data (Backup GPT Table: Die überprüfte CRC32-Prüfsumme ist $D15A79FE Prüfsumme für GPT Header (Backup GPT Header : 7) berechnen … GPT Header (Backup GPT Header : 7): Die überprüfte CRC32-Prüfsumme ist $D36773E6 Die überprüfte CRC32-Prüfsumme ist $EF324497 /dev/disk2 GUID_partition_scheme /dev/disk2s1 Apple_HFS /Volumes/JDK 18.0.1.1 2022-07-04 13:21:56 : INFO : jdk18 : Mounted: /Volumes/JDK 18.0.1.1 2022-07-04 13:21:56 : DEBUG : jdk18 : Found pkg(s): /Volumes/JDK 18.0.1.1/JDK 18.0.1.1.pkg 2022-07-04 13:21:56 : INFO : jdk18 : found pkg: /Volumes/JDK 18.0.1.1/JDK 18.0.1.1.pkg 2022-07-04 13:21:56 : INFO : jdk18 : Verifying: /Volumes/JDK 18.0.1.1/JDK 18.0.1.1.pkg 2022-07-04 13:21:56 : DEBUG : jdk18 : File list: -rw-r--r-- 1 savvas staff 171M 25 Apr 23:09 /Volumes/JDK 18.0.1.1/JDK 18.0.1.1.pkg 2022-07-04 13:21:56 : DEBUG : jdk18 : File type: /Volumes/JDK 18.0.1.1/JDK 18.0.1.1.pkg: xar archive compressed TOC: 5557, SHA-1 checksum 2022-07-04 13:21:56 : DEBUG : jdk18 : spctlOut is /Volumes/JDK 18.0.1.1/JDK 18.0.1.1.pkg: accepted 2022-07-04 13:21:56 : DEBUG : jdk18 : source=Notarized Developer ID 2022-07-04 13:21:56 : DEBUG : jdk18 : origin=Developer ID Installer: Oracle America, Inc. (VB5E2TV963) 2022-07-04 13:21:56 : INFO : jdk18 : Team ID: VB5E2TV963 (expected: VB5E2TV963 ) 2022-07-04 13:21:56 : DEBUG : jdk18 : DEBUG enabled, skipping installation 2022-07-04 13:21:56 : INFO : jdk18 : Finishing... 2022-07-04 13:22:06 : INFO : jdk18 : Custom App Version detection is used, found 18.0.1.1 2022-07-04 13:22:06 : REQ : jdk18 : Installed Java SE Development Kit 18, version 18.0.1.1 2022-07-04 13:22:06 : INFO : jdk18 : notifying 2022-07-04 13:22:06 : DEBUG : jdk18 : Unmounting /Volumes/JDK 18.0.1.1 2022-07-04 13:22:07 : DEBUG : jdk18 : Debugging enabled, Unmounting output was: "disk2" ejected. 2022-07-04 13:22:07 : DEBUG : jdk18 : DEBUG mode 1, not reopening anything 2022-07-04 13:22:07 : REQ : jdk18 : All done! 2022-07-04 13:22:07 : REQ : jdk18 : ################## End Installomator, exit code 0 --- fragments/labels/jdk18.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 fragments/labels/jdk18.sh diff --git a/fragments/labels/jdk18.sh b/fragments/labels/jdk18.sh new file mode 100644 index 0000000..0369e36 --- /dev/null +++ b/fragments/labels/jdk18.sh @@ -0,0 +1,13 @@ +jdk18) + name="Java SE Development Kit 18" + type="pkgInDmg" + versionKey="CFBundleShortVersionString" + if [[ $(arch) == "arm64" ]]; then + downloadURL="https://download.oracle.com/java/18/latest/jdk-18_macos-aarch64_bin.dmg" + elif [[ $(arch) == "i386" ]]; then + downloadURL="https://download.oracle.com/java/18/latest/jdk-18_macos-x64_bin.dmg" + fi + appCustomVersion(){ java --version | grep java | awk '{print $2}' } + appNewVersion=$(curl -sf "https://www.oracle.com/java/technologies/downloads/#jdk18-mac" | grep -m 1 "Java SE Development Kit" | sed "s|.*Kit \(.*\) downloads.*|\\1|") + expectedTeamID="VB5E2TV963" + ;; From face2a7e934508989989550ef086b6a0d77ae6fa Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Mon, 4 Jul 2022 15:46:02 +0200 Subject: [PATCH 09/96] New Label: Filemaker Pro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "FileMaker is a cross-platform relational database application from Claris International, a subsidiary of Apple Inc. It integrates a database engine with a graphical user interface (GUI) and security features, allowing users to modify a database by dragging new elements into layouts, screens, or forms. It is available in desktop, server, iOS and web-delivery configurations" ./assemble.sh -l /Desktop/Mosyle/Resources/InstallomatorLabels filemakerpro 2022-07-04 15:35:36 : REQ : filemakerpro : ################## Start Installomator v. 10.0beta, date 2022-07-04 2022-07-04 15:35:36 : INFO : filemakerpro : ################## Version: 10.0beta 2022-07-04 15:35:36 : INFO : filemakerpro : ################## Date: 2022-07-04 2022-07-04 15:35:36 : INFO : filemakerpro : ################## filemakerpro 2022-07-04 15:35:37 : DEBUG : filemakerpro : DEBUG mode 1 enabled. 2022-07-04 15:35:37 : INFO : filemakerpro : BLOCKING_PROCESS_ACTION=tell_user 2022-07-04 15:35:37 : INFO : filemakerpro : NOTIFY=success 2022-07-04 15:35:37 : INFO : filemakerpro : LOGGING=DEBUG 2022-07-04 15:35:37 : INFO : filemakerpro : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-07-04 15:35:37 : INFO : filemakerpro : Label type: dmg 2022-07-04 15:35:37 : INFO : filemakerpro : archiveName: FileMaker Pro.dmg 2022-07-04 15:35:37 : INFO : filemakerpro : no blocking processes defined, using FileMaker Pro as default 2022-07-04 15:35:37 : DEBUG : filemakerpro : Changing directory to /Users/savvas/Desktop/Mosyle/Resources/Installomator-main original/build 2022-07-04 15:35:37 : INFO : filemakerpro : App(s) found: /Applications/FileMaker Pro.app 2022-07-04 15:35:37 : INFO : filemakerpro : found app at /Applications/FileMaker Pro.app, version 19.5.1.36, on versionKey BuildVersion 2022-07-04 15:35:37 : INFO : filemakerpro : appversion: 19.5.1.36 2022-07-04 15:35:37 : INFO : filemakerpro : Latest version of FileMaker Pro is 19.5.1.36 2022-07-04 15:35:37 : WARN : filemakerpro : DEBUG mode 1 enabled, not exiting, but there is no new version of app. 2022-07-04 15:35:37 : INFO : filemakerpro : FileMaker Pro.dmg exists and DEBUG mode 1 enabled, skipping download 2022-07-04 15:35:37 : DEBUG : filemakerpro : DEBUG mode 1, not checking for blocking processes 2022-07-04 15:35:37 : REQ : filemakerpro : Installing FileMaker Pro 2022-07-04 15:35:37 : INFO : filemakerpro : Mounting /Users/savvas/Desktop/Mosyle/Resources/Installomator-main original/build/FileMaker Pro.dmg 2022-07-04 15:35:38 : DEBUG : filemakerpro : Debugging enabled, dmgmount output was: Die erwartete CRC32-Prüfsumme ist $4150F8F9 /dev/disk2 GUID_partition_scheme /dev/disk2s1 Apple_HFS /Volumes/FileMaker Pro 19 2022-07-04 15:35:38 : INFO : filemakerpro : Mounted: /Volumes/FileMaker Pro 19 2022-07-04 15:35:38 : INFO : filemakerpro : Verifying: /Volumes/FileMaker Pro 19/FileMaker Pro.app 2022-07-04 15:35:38 : DEBUG : filemakerpro : App size: 966M /Volumes/FileMaker Pro 19/FileMaker Pro.app 2022-07-04 15:38:04 : DEBUG : filemakerpro : Debugging enabled, App Verification output was: /Volumes/FileMaker Pro 19/FileMaker Pro.app: accepted source=Notarized Developer ID origin=Developer ID Application: Claris International Inc. (J6K4T76U7W) 2022-07-04 15:38:04 : INFO : filemakerpro : Team ID matching: J6K4T76U7W (expected: J6K4T76U7W ) 2022-07-04 15:38:04 : INFO : filemakerpro : Downloaded version of FileMaker Pro is 19.5.1.36 on versionKey BuildVersion, same as installed. 2022-07-04 15:38:04 : DEBUG : filemakerpro : Unmounting /Volumes/FileMaker Pro 19 2022-07-04 15:38:05 : DEBUG : filemakerpro : Debugging enabled, Unmounting output was: "disk2" ejected. 2022-07-04 15:38:05 : DEBUG : filemakerpro : DEBUG mode 1, not reopening anything 2022-07-04 15:38:05 : REG : filemakerpro : No new version to install 2022-07-04 15:38:05 : REQ : filemakerpro : ################## End Installomator, exit code 0 --- fragments/labels/filemakerpro.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 fragments/labels/filemakerpro.sh diff --git a/fragments/labels/filemakerpro.sh b/fragments/labels/filemakerpro.sh new file mode 100644 index 0000000..f6c7a80 --- /dev/null +++ b/fragments/labels/filemakerpro.sh @@ -0,0 +1,8 @@ +filemakerpro) + name="FileMaker Pro" + type="dmg" + versionKey="BuildVersion" + downloadURL=$(curl -fs https://www.filemaker.com/redirects/ss.txt | grep '\"PRO..MAC\"' | tail -1 | sed "s|.*url\":\"\(.*\)\".*|\\1|") + appNewVersion=$(curl -fs https://www.filemaker.com/redirects/ss.txt | grep '\"PRO..MAC\"' | tail -1 | sed "s|.*fmp_\(.*\).dmg.*|\\1|") + expectedTeamID="J6K4T76U7W" + ;; From 6d7a64667f6185899f7a0e155bc0ae0ec89f758a Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Mon, 4 Jul 2022 23:55:38 +0200 Subject: [PATCH 10/96] New Label: Horos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Horos™ is a free, open source medical image viewer. The goal of the Horos Project is to develop a fully functional, 64-bit medical image viewer for OS X. Horos is based upon OsiriX and other open source medical imaging libraries. Horos is made freely available under the GNU Lesser General Public License, Version 3 (LGPL-3.0)" ./assemble.sh -l /Desktop/Mosyle/Resources/InstallomatorLabels horos 2022-07-04 23:48:31 : REQ : horos : ################## Start Installomator v. 10.0beta, date 2022-07-04 2022-07-04 23:48:31 : INFO : horos : ################## Version: 10.0beta 2022-07-04 23:48:31 : INFO : horos : ################## Date: 2022-07-04 2022-07-04 23:48:31 : INFO : horos : ################## horos 2022-07-04 23:48:31 : DEBUG : horos : DEBUG mode 1 enabled. 2022-07-04 23:48:31 : INFO : horos : BLOCKING_PROCESS_ACTION=tell_user 2022-07-04 23:48:31 : INFO : horos : NOTIFY=success 2022-07-04 23:48:31 : INFO : horos : LOGGING=DEBUG 2022-07-04 23:48:31 : INFO : horos : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-07-04 23:48:31 : INFO : horos : Label type: dmg 2022-07-04 23:48:31 : INFO : horos : archiveName: Horos.dmg 2022-07-04 23:48:31 : INFO : horos : no blocking processes defined, using Horos as default 2022-07-04 23:48:31 : DEBUG : horos : Changing directory to /Users/savvas/Desktop/Mosyle/Resources/Installomator-main original/build 2022-07-04 23:48:31 : INFO : horos : App(s) found: /Applications/Horos.app 2022-07-04 23:48:32 : INFO : horos : found app at /Applications/Horos.app, version Horos v4.0.0 RC5, on versionKey CFBundleGetInfoString 2022-07-04 23:48:32 : INFO : horos : appversion: Horos v4.0.0 RC5 2022-07-04 23:48:32 : INFO : horos : Latest version of Horos is 4.0.0RC5 2022-07-04 23:48:32 : INFO : horos : Horos.dmg exists and DEBUG mode 1 enabled, skipping download 2022-07-04 23:48:32 : DEBUG : horos : DEBUG mode 1, not checking for blocking processes 2022-07-04 23:48:32 : REQ : horos : Installing Horos 2022-07-04 23:48:32 : INFO : horos : Mounting /Users/savvas/Desktop/Mosyle/Resources/Installomator-main original/build/Horos.dmg 2022-07-04 23:48:33 : DEBUG : horos : Debugging enabled, dmgmount output was: SOFTWARE LICENSE: By initiating this download and installation you acknowledge and agree that this software application is not intended for medical usage or diagnostic purposes. ============================================ Horos is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation,  version 3 of the License. The Horos Project was based originally upon the OsiriX Project which at the time of the code fork was licensed as a LGPL project. However, not all of the the source-code was properly documented and file headers were not all updated with the appropriate license terms. The Horos Project, originally was licensed under the GNU GPL license. However, contributors to the software since that time have agreed to modify the license to the GNU LGPL in order to be conform to the changes previously made to the OsiriX Project. Horos is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE OR USE.   See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Horos.  If not, see http://www.gnu.org/licenses/lgpl.html Prior versions of this file were published by the OsiriX team pursuant to the below notice and licensing protocol. ============================================ Program:   OsiriX Copyright (c) OsiriX Team All rights reserved. Distributed under GNU - LGPL   See http://www.osirix-viewer.com/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ============================================ This version of Horos is linked against the Grok JPEG 2000 library, for fast viewing of JPEG 2000 images. https://github.com/GrokImageCompression/grok The Grok JPEG 2000 library is licensed under the terms of the GNU Affero General Public License as follows Copyright (C) 2016 Grok Image Compression Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . ============================================ GNU LESSER GENERAL PUBLIC LICENSE GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License. “The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”. The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. =============================================================================================================== GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. “This License” refers to version 3 of the GNU General Public License. “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . Die erwartete CRC32-Prüfsumme ist $2C68A922 /dev/disk2 Apple_partition_scheme /dev/disk2s1 Apple_partition_map /dev/disk2s2 Apple_HFS /Volumes/Horos 2022-07-04 23:48:33 : INFO : horos : Mounted: /Volumes/Horos 2022-07-04 23:48:33 : INFO : horos : Verifying: /Volumes/Horos/Horos.app 2022-07-04 23:48:33 : DEBUG : horos : App size: 146M /Volumes/Horos/Horos.app 2022-07-04 23:48:36 : DEBUG : horos : Debugging enabled, App Verification output was: /Volumes/Horos/Horos.app: accepted source=Notarized Developer ID origin=Developer ID Application: Nimble CO LLC (TPT6TVH8UY) 2022-07-04 23:48:36 : INFO : horos : Team ID matching: TPT6TVH8UY (expected: TPT6TVH8UY ) 2022-07-04 23:48:36 : INFO : horos : Downloaded version of Horos is Horos v4.0.0 RC5 on versionKey CFBundleGetInfoString, same as installed. 2022-07-04 23:48:36 : DEBUG : horos : Unmounting /Volumes/Horos 2022-07-04 23:48:36 : DEBUG : horos : Debugging enabled, Unmounting output was: "disk2" ejected. 2022-07-04 23:48:36 : DEBUG : horos : DEBUG mode 1, not reopening anything 2022-07-04 23:48:36 : REG : horos : No new version to install 2022-07-04 23:48:36 : REQ : horos : ################## End Installomator, exit code 0 --- fragments/labels/horos.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 fragments/labels/horos.sh diff --git a/fragments/labels/horos.sh b/fragments/labels/horos.sh new file mode 100644 index 0000000..26b8523 --- /dev/null +++ b/fragments/labels/horos.sh @@ -0,0 +1,8 @@ +horos) + name="Horos" + type="dmg" + versionKey="CFBundleGetInfoString" + appNewVersion=$(curl -fs https://github.com/horosproject/horos/blob/horos/Horos/Info.plist | grep -A 4 "CFBundleGetInfoString" | tail -1 | sed -r 's/.*Horos v([^<]+).*/\1/' | sed 's/ //g') + downloadURL="https://horosproject.org/horos-content/Horos"$appNewVersion".dmg" + expectedTeamID="TPT6TVH8UY" + ;; From 14fc1db433a4f30cab8eeb082b2c9ec14c3af680 Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Sat, 9 Jul 2022 13:02:07 +0200 Subject: [PATCH 11/96] New Label: ChronoSync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "ChronoSync is a complete, all-in-one solution for file syncs, backups, bootable backups and cloud storage for your Mac. In use by thousands of photographers, video editors, filmmakers, musicians and other data professionals. It’s simply the best way to backup and sync your Mac. No other app can compare! Whatever your backup and sync scenario, ChronoSync has got you covered!" ./assemble.sh -l /Desktop/Mosyle/Resources/InstallomatorLabels chronosync 2022-07-09 12:56:22 : REQ : chronosync : ################## Start Installomator v. 10.0beta, date 2022-07-09 2022-07-09 12:56:22 : INFO : chronosync : ################## Version: 10.0beta 2022-07-09 12:56:22 : INFO : chronosync : ################## Date: 2022-07-09 2022-07-09 12:56:22 : INFO : chronosync : ################## chronosync 2022-07-09 12:56:22 : DEBUG : chronosync : DEBUG mode 1 enabled. 2022-07-09 12:56:23 : INFO : chronosync : BLOCKING_PROCESS_ACTION=tell_user 2022-07-09 12:56:23 : INFO : chronosync : NOTIFY=success 2022-07-09 12:56:23 : INFO : chronosync : LOGGING=DEBUG 2022-07-09 12:56:23 : INFO : chronosync : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-07-09 12:56:23 : INFO : chronosync : Label type: pkgInDmg 2022-07-09 12:56:23 : INFO : chronosync : archiveName: ChronoSync.dmg 2022-07-09 12:56:23 : INFO : chronosync : no blocking processes defined, using ChronoSync as default 2022-07-09 12:56:23 : DEBUG : chronosync : Changing directory to /Users/savvas/Desktop/Mosyle/Resources/Installomator-main original/build 2022-07-09 12:56:23 : INFO : chronosync : name: ChronoSync, appName: ChronoSync.app 2022-07-09 12:56:23 : WARN : chronosync : No previous app found 2022-07-09 12:56:23 : WARN : chronosync : could not find ChronoSync.app 2022-07-09 12:56:23 : INFO : chronosync : appversion: 2022-07-09 12:56:23 : INFO : chronosync : Latest version of ChronoSync is 10.2.0 2022-07-09 12:56:23 : INFO : chronosync : ChronoSync.dmg exists and DEBUG mode 1 enabled, skipping download 2022-07-09 12:56:23 : DEBUG : chronosync : DEBUG mode 1, not checking for blocking processes 2022-07-09 12:56:23 : REQ : chronosync : Installing ChronoSync 2022-07-09 12:56:23 : INFO : chronosync : Mounting /Users/savvas/Desktop/Mosyle/Resources/Installomator-main original/build/ChronoSync.dmg 2022-07-09 12:56:24 : DEBUG : chronosync : Debugging enabled, dmgmount output was: Prüfsumme für whole disk (Apple_HFS : 0) berechnen … whole disk (Apple_HFS : 0): Die überprüfte CRC32-Prüfsumme ist $09AFB4EC Die überprüfte CRC32-Prüfsumme ist $A77D4F24 /dev/disk4 /Volumes/ChronoSync 2022-07-09 12:56:24 : INFO : chronosync : Mounted: /Volumes/ChronoSync 2022-07-09 12:56:24 : DEBUG : chronosync : Found pkg(s): /Volumes/ChronoSync/Install.pkg 2022-07-09 12:56:24 : DEBUG : chronosync : /Volumes/ChronoSync/Remove.pkg 2022-07-09 12:56:24 : INFO : chronosync : found pkg: /Volumes/ChronoSync/Install.pkg 2022-07-09 12:56:24 : INFO : chronosync : Verifying: /Volumes/ChronoSync/Install.pkg 2022-07-09 12:56:24 : DEBUG : chronosync : File list: -rw-r--r--@ 1 savvas staff 85M 18 Mai 16:02 /Volumes/ChronoSync/Install.pkg 2022-07-09 12:56:24 : DEBUG : chronosync : File type: /Volumes/ChronoSync/Install.pkg: xar archive compressed TOC: 8245, SHA-1 checksum 2022-07-09 12:56:24 : DEBUG : chronosync : spctlOut is /Volumes/ChronoSync/Install.pkg: accepted 2022-07-09 12:56:24 : DEBUG : chronosync : source=Notarized Developer ID 2022-07-09 12:56:24 : DEBUG : chronosync : origin=Developer ID Installer: Econ Technologies, Inc. (9U697UM7YX) 2022-07-09 12:56:24 : INFO : chronosync : Team ID: 9U697UM7YX (expected: 9U697UM7YX ) 2022-07-09 12:56:24 : DEBUG : chronosync : DEBUG enabled, skipping installation 2022-07-09 12:56:24 : INFO : chronosync : Finishing... 2022-07-09 12:56:34 : INFO : chronosync : name: ChronoSync, appName: ChronoSync.app 2022-07-09 12:56:34 : WARN : chronosync : No previous app found 2022-07-09 12:56:34 : WARN : chronosync : could not find ChronoSync.app 2022-07-09 12:56:34 : REQ : chronosync : Installed ChronoSync 2022-07-09 12:56:34 : INFO : chronosync : notifying 2022-07-09 12:56:34 : DEBUG : chronosync : Unmounting /Volumes/ChronoSync 2022-07-09 12:56:35 : DEBUG : chronosync : Debugging enabled, Unmounting output was: "disk4" ejected. 2022-07-09 12:56:35 : DEBUG : chronosync : DEBUG mode 1, not reopening anything 2022-07-09 12:56:35 : REQ : chronosync : All done! 2022-07-09 12:56:35 : REQ : chronosync : ################## End Installomator, exit code 0 --- fragments/labels/chronosync.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 fragments/labels/chronosync.sh diff --git a/fragments/labels/chronosync.sh b/fragments/labels/chronosync.sh new file mode 100644 index 0000000..dcec55a --- /dev/null +++ b/fragments/labels/chronosync.sh @@ -0,0 +1,8 @@ +chronosync) + name="ChronoSync" + type="pkgInDmg" + releaseURL="https://www.econtechnologies.com/UC/updatecheck.php?prod=ChronoSync&lang=en&plat=mac&os=10.14.1&hw=i64&req=1&vers=#" + appNewVersion=$(curl -sf $releaseURL | sed -r 's/.*VERSION=([^<]+).*/\1/') + downloadURL="https://downloads.econtechnologies.com/CS4_Download.dmg" + expectedTeamID="9U697UM7YX" + ;; From 72d2c4ab7444a597ef1fc6318bb71358f6a14dee Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Sat, 9 Jul 2022 13:05:46 +0200 Subject: [PATCH 12/96] New Label: ChronoAgent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "ChronoAgent is an invisible app that runs silently in the background providing ChronoSync or InterConneX a direct connection to a remote Mac. It provides a much more secure, reliable and higher performance connection than standard file sharing. If you’re synchronizing or backing up files between two Macs, ChronoAgent is simply the best way to establish a connection between them." ./assemble.sh -l /Desktop/Mosyle/Resources/InstallomatorLabels chronoagent 2022-07-09 12:55:23 : REQ : chronoagent : ################## Start Installomator v. 10.0beta, date 2022-07-09 2022-07-09 12:55:23 : INFO : chronoagent : ################## Version: 10.0beta 2022-07-09 12:55:23 : INFO : chronoagent : ################## Date: 2022-07-09 2022-07-09 12:55:23 : INFO : chronoagent : ################## chronoagent 2022-07-09 12:55:23 : DEBUG : chronoagent : DEBUG mode 1 enabled. 2022-07-09 12:55:24 : INFO : chronoagent : BLOCKING_PROCESS_ACTION=tell_user 2022-07-09 12:55:24 : INFO : chronoagent : NOTIFY=success 2022-07-09 12:55:24 : INFO : chronoagent : LOGGING=DEBUG 2022-07-09 12:55:24 : INFO : chronoagent : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-07-09 12:55:24 : INFO : chronoagent : Label type: pkgInDmg 2022-07-09 12:55:24 : INFO : chronoagent : archiveName: ChronoAgent.dmg 2022-07-09 12:55:24 : INFO : chronoagent : no blocking processes defined, using ChronoAgent as default 2022-07-09 12:55:24 : DEBUG : chronoagent : Changing directory to /Users/savvas/Desktop/Mosyle/Resources/Installomator-main original/build 2022-07-09 12:55:24 : INFO : chronoagent : name: ChronoAgent, appName: ChronoAgent.app 2022-07-09 12:55:24 : WARN : chronoagent : No previous app found 2022-07-09 12:55:24 : WARN : chronoagent : could not find ChronoAgent.app 2022-07-09 12:55:24 : INFO : chronoagent : appversion: 2022-07-09 12:55:24 : INFO : chronoagent : Latest version of ChronoAgent is 2.1.0 2022-07-09 12:55:24 : INFO : chronoagent : ChronoAgent.dmg exists and DEBUG mode 1 enabled, skipping download 2022-07-09 12:55:24 : DEBUG : chronoagent : DEBUG mode 1, not checking for blocking processes 2022-07-09 12:55:24 : REQ : chronoagent : Installing ChronoAgent 2022-07-09 12:55:24 : INFO : chronoagent : Mounting /Users/savvas/Desktop/Mosyle/Resources/Installomator-main original/build/ChronoAgent.dmg 2022-07-09 12:55:25 : DEBUG : chronoagent : Debugging enabled, dmgmount output was: Prüfsumme für whole disk (Apple_HFS : 0) berechnen … whole disk (Apple_HFS : 0): Die überprüfte CRC32-Prüfsumme ist $46C474C3 Die überprüfte CRC32-Prüfsumme ist $40A3C999 /dev/disk4 /Volumes/ChronoAgent 2022-07-09 12:55:25 : INFO : chronoagent : Mounted: /Volumes/ChronoAgent 2022-07-09 12:55:25 : DEBUG : chronoagent : Found pkg(s): /Volumes/ChronoAgent/Install.pkg 2022-07-09 12:55:25 : DEBUG : chronoagent : /Volumes/ChronoAgent/Remove.pkg 2022-07-09 12:55:25 : INFO : chronoagent : found pkg: /Volumes/ChronoAgent/Install.pkg 2022-07-09 12:55:25 : INFO : chronoagent : Verifying: /Volumes/ChronoAgent/Install.pkg 2022-07-09 12:55:25 : DEBUG : chronoagent : File list: -rw-r--r--@ 1 savvas staff 35M 27 Apr 14:37 /Volumes/ChronoAgent/Install.pkg 2022-07-09 12:55:25 : DEBUG : chronoagent : File type: /Volumes/ChronoAgent/Install.pkg: xar archive compressed TOC: 8440, SHA-1 checksum, contains iAPX 286 executable large model (COFF) not stripped 2022-07-09 12:55:25 : DEBUG : chronoagent : - iAPX 286 executable large model (COFF) not stripped 2022-07-09 12:55:25 : DEBUG : chronoagent : spctlOut is /Volumes/ChronoAgent/Install.pkg: accepted 2022-07-09 12:55:25 : DEBUG : chronoagent : source=Notarized Developer ID 2022-07-09 12:55:25 : DEBUG : chronoagent : origin=Developer ID Installer: Econ Technologies, Inc. (9U697UM7YX) 2022-07-09 12:55:25 : INFO : chronoagent : Team ID: 9U697UM7YX (expected: 9U697UM7YX ) 2022-07-09 12:55:25 : DEBUG : chronoagent : DEBUG enabled, skipping installation 2022-07-09 12:55:25 : INFO : chronoagent : Finishing... 2022-07-09 12:55:35 : INFO : chronoagent : name: ChronoAgent, appName: ChronoAgent.app 2022-07-09 12:55:35 : WARN : chronoagent : No previous app found 2022-07-09 12:55:35 : WARN : chronoagent : could not find ChronoAgent.app 2022-07-09 12:55:35 : REQ : chronoagent : Installed ChronoAgent 2022-07-09 12:55:35 : INFO : chronoagent : notifying 2022-07-09 12:55:35 : DEBUG : chronoagent : Unmounting /Volumes/ChronoAgent 2022-07-09 12:55:36 : DEBUG : chronoagent : Debugging enabled, Unmounting output was: "disk4" ejected. 2022-07-09 12:55:36 : DEBUG : chronoagent : DEBUG mode 1, not reopening anything 2022-07-09 12:55:36 : REQ : chronoagent : All done! 2022-07-09 12:55:36 : REQ : chronoagent : ################## End Installomator, exit code 0 --- fragments/labels/chronoagent.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 fragments/labels/chronoagent.sh diff --git a/fragments/labels/chronoagent.sh b/fragments/labels/chronoagent.sh new file mode 100644 index 0000000..124238d --- /dev/null +++ b/fragments/labels/chronoagent.sh @@ -0,0 +1,11 @@ +chronoagent) + name="ChronoAgent" + type="pkgInDmg" + # packageID="com.econtechnologies.preference.chronoagent" + # versionKey="CFBundleVersion" + # None of the above can read out the installed version + releaseURL="https://www.econtechnologies.com/UC/updatecheck.php?prod=ChronoAgent&lang=en&plat=mac&os=10.14.1&hw=i64&req=1&vers=#" + appNewVersion=$(curl -sf $releaseURL | sed -r 's/.*VERSION=([^<]+).*/\1/') + downloadURL="https://downloads.econtechnologies.com/CA_Mac_Download.dmg" + expectedTeamID="9U697UM7YX" + ;; From e90dfd6d82a8be416dfdd2882ff9426f612390fb Mon Sep 17 00:00:00 2001 From: David Champion Date: Mon, 11 Jul 2022 12:25:56 -0700 Subject: [PATCH 13/96] Add Tailscale label --- fragments/labels/tailscale.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 fragments/labels/tailscale.sh diff --git a/fragments/labels/tailscale.sh b/fragments/labels/tailscale.sh new file mode 100644 index 0000000..02852f5 --- /dev/null +++ b/fragments/labels/tailscale.sh @@ -0,0 +1,8 @@ +tailscale) + name="Tailscale" + type="zip" + appNewVersion="$(curl -s https://pkgs.tailscale.com/stable/ | awk -F- '/Tailscale.*macos.zip/ {print $2}')" + downloadURL="https://pkgs.tailscale.com/stable/Tailscale-${appNewVersion}-macos.zip" + expectedTeamID="W5364U7YZB" + versionKey="CFBundleShortVersionString" + ;; From 9fb414958a998279909afdd04307ebf4c585747e Mon Sep 17 00:00:00 2001 From: Tadayuki Onishi Date: Tue, 12 Jul 2022 10:54:36 +0900 Subject: [PATCH 14/96] santa and nomad are forced to ignore blocking Those applications are forcibly restarted by the launch agent, resulting in infinite blocking process processing. --- Installomator.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Installomator.sh b/Installomator.sh index 54d2fbb..d93ed3b 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -3724,6 +3724,7 @@ nomad) downloadURL="https://files.nomad.menu/NoMAD.pkg" appNewVersion=$(curl -fs https://nomad.menu/support/ | grep "NoMAD Downloads" | sed -E 's/.*Current Version ([0-9\.]*)<.*/\1/g') expectedTeamID="VRPY9KHGX6" + blockingProcesses=( NONE ) ;; nomadlogin) # credit: Søren Theilgaard (@theilgaard) @@ -4248,6 +4249,7 @@ santa) downloadURL=$(downloadURLFromGit google santa) appNewVersion=$(versionFromGit google santa) expectedTeamID="EQHXZ8M8AV" + blockingProcesses=( NONE ) ;; scaleft) name="ScaleFT" From e4cff5821d8cd5b30bff4908d209f3128871fff0 Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Wed, 13 Jul 2022 18:05:44 +0200 Subject: [PATCH 15/96] New Label: Archiware P5 "Archiware's P5 Software Suite is ideal for businesses in the Media and Entertainment industry. Four modules in the Archiware P5 Suite secure data using the A-B-C of data management: Archive, Backup and Cloning. All modules can be combined to create multiple-step security concepts to achieve maximum data protection. Archiware P5 secures data to disk, tape and cloud and has integrations with numerous partners." sudo ./assemble.sh -l /Desktop/Mosyle/Resources/InstallomatorLabels awpst NOTIFY=silent DEBUG=0 Password: 2022-07-13 17:46:07 : WARN : awpst : setting variable from argument NOTIFY=silent 2022-07-13 17:46:07 : WARN : awpst : setting variable from argument DEBUG=0 2022-07-13 17:46:07 : REQ : awpst : ################## Start Installomator v. 10.0beta, date 2022-07-13 2022-07-13 17:46:07 : INFO : awpst : ################## Version: 10.0beta 2022-07-13 17:46:07 : INFO : awpst : ################## Date: 2022-07-13 2022-07-13 17:46:07 : INFO : awpst : ################## awpst 2022-07-13 17:46:07 : INFO : awpst : BLOCKING_PROCESS_ACTION=tell_user 2022-07-13 17:46:07 : INFO : awpst : NOTIFY=silent 2022-07-13 17:46:07 : INFO : awpst : LOGGING=INFO 2022-07-13 17:46:07 : INFO : awpst : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-07-13 17:46:07 : INFO : awpst : Label type: pkgInDmg 2022-07-13 17:46:07 : INFO : awpst : archiveName: P5.dmg 2022-07-13 17:46:07 : INFO : awpst : no blocking processes defined, using P5 as default 2022-07-13 17:46:07 : INFO : awpst : found packageID com.archiware.presstore installed, version 7.0.6 2022-07-13 17:46:07 : INFO : awpst : appversion: 7.0.6 2022-07-13 17:46:07 : INFO : awpst : Latest version of P5 is 7.0.7 2022-07-13 17:46:07 : REQ : awpst : Downloading https://p5-downloads.s3.amazonaws.com/awpst707-darwin.dmg to P5.dmg 2022-07-13 17:46:27 : REQ : awpst : no more blocking processes, continue with update 2022-07-13 17:46:27 : REQ : awpst : Installing P5 2022-07-13 17:46:27 : INFO : awpst : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.rwTUoQOZ/P5.dmg 2022-07-13 17:46:27 : INFO : awpst : Mounted: /Volumes/P5-707 2022-07-13 17:46:27 : INFO : awpst : found pkg: /Volumes/P5-707/P5-707-Install.pkg 2022-07-13 17:46:27 : INFO : awpst : Verifying: /Volumes/P5-707/P5-707-Install.pkg 2022-07-13 17:46:28 : INFO : awpst : Team ID: 5H5EU6F965 (expected: 5H5EU6F965 ) 2022-07-13 17:46:28 : INFO : awpst : Checking package version. 2022-07-13 17:46:28 : INFO : awpst : Downloaded package com.archiware.presstore version 2022-07-13 17:46:28 : INFO : awpst : Installing /Volumes/P5-707/P5-707-Install.pkg to / 2022-07-13 17:47:06 : INFO : awpst : Finishing... 2022-07-13 17:47:16 : INFO : awpst : found packageID com.archiware.presstore installed, version 7.0.7 2022-07-13 17:47:16 : REQ : awpst : Installed P5, version 7.0.7 2022-07-13 17:47:16 : INFO : awpst : App not closed, so no reopen. 2022-07-13 17:47:16 : REQ : awpst : All done! 2022-07-13 17:47:16 : REQ : awpst : ################## End Installomator, exit code 0 --- fragments/labels/awpst.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 fragments/labels/awpst.sh diff --git a/fragments/labels/awpst.sh b/fragments/labels/awpst.sh new file mode 100644 index 0000000..876d176 --- /dev/null +++ b/fragments/labels/awpst.sh @@ -0,0 +1,10 @@ +awpst) + name="P5" + type="pkgInDmg" + packageID="com.archiware.presstore" + appNewVersion=$(curl -sf https://www.archiware.com/download-p5 | grep -m 1 "ARCHIWARE P5 Version" | sed "s|.*Version \(.*\) -.*|\\1|") + downloadURL=$(appNrVersion=`sed 's/[^0-9]//g' <<< $appNewVersion` && echo https://p5-downloads.s3.amazonaws.com/awpst"$appNrVersion"-darwin.dmg) + pkgName=$(appNrVersion=`sed 's/[^0-9]//g' <<< $appNewVersion` && echo P5-"$appNrVersion"-Install.pkg) + expectedTeamID="5H5EU6F965" + # blockingProcesses=( nsd ) + ;; From d0d3510689fd0d35e50ba0d01b6721346b4d877f Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Wed, 13 Jul 2022 18:14:42 +0200 Subject: [PATCH 16/96] New Label: Archiware P5 Backup2Go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "P5 Backup2Go is the ideal tool to backup workstations – regardless of their location. In the office, on the road or at home, P5 works cross-platform and allows mobile backups of laptops and desktops on central disk storage." sudo ./assemble.sh -l /Desktop/Mosyle/Resources/InstallomatorLabels awb2go NOTIFY=silent DEBUG=0 2022-07-13 18:11:07 : WARN : awb2go : setting variable from argument NOTIFY=silent 2022-07-13 18:11:07 : WARN : awb2go : setting variable from argument DEBUG=0 2022-07-13 18:11:07 : REQ : awb2go : ################## Start Installomator v. 10.0beta, date 2022-07-13 2022-07-13 18:11:07 : INFO : awb2go : ################## Version: 10.0beta 2022-07-13 18:11:07 : INFO : awb2go : ################## Date: 2022-07-13 2022-07-13 18:11:07 : INFO : awb2go : ################## awb2go 2022-07-13 18:11:07 : INFO : awb2go : BLOCKING_PROCESS_ACTION=tell_user 2022-07-13 18:11:07 : INFO : awb2go : NOTIFY=silent 2022-07-13 18:11:07 : INFO : awb2go : LOGGING=INFO 2022-07-13 18:11:07 : INFO : awb2go : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-07-13 18:11:07 : INFO : awb2go : Label type: pkgInDmg 2022-07-13 18:11:07 : INFO : awb2go : archiveName: P5 Workstation.dmg 2022-07-13 18:11:07 : INFO : awb2go : no blocking processes defined, using P5 Workstation as default 2022-07-13 18:11:08 : INFO : awb2go : found packageID com.archiware.presstore installed, version 7.0.6 2022-07-13 18:11:08 : INFO : awb2go : appversion: 7.0.6 2022-07-13 18:11:08 : INFO : awb2go : Latest version of P5 Workstation is 7.0.7 2022-07-13 18:11:08 : REQ : awb2go : Downloading https://p5-downloads.s3.amazonaws.com/awpst707-darwin.dmg to P5 Workstation.dmg 2022-07-13 18:11:27 : REQ : awb2go : no more blocking processes, continue with update 2022-07-13 18:11:27 : REQ : awb2go : Installing P5 Workstation 2022-07-13 18:11:27 : INFO : awb2go : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.Lw7ac9Pw/P5 Workstation.dmg 2022-07-13 18:11:28 : INFO : awb2go : Mounted: /Volumes/P5-707 2022-07-13 18:11:28 : INFO : awb2go : found pkg: /Volumes/P5-707/B2Go-Workstation/P5-Workstation-707-Install.pkg 2022-07-13 18:11:28 : INFO : awb2go : Verifying: /Volumes/P5-707/B2Go-Workstation/P5-Workstation-707-Install.pkg 2022-07-13 18:11:28 : INFO : awb2go : Team ID: 5H5EU6F965 (expected: 5H5EU6F965 ) 2022-07-13 18:11:28 : INFO : awb2go : Checking package version. 2022-07-13 18:11:28 : INFO : awb2go : Downloaded package com.archiware.presstore version 2022-07-13 18:11:28 : INFO : awb2go : Installing /Volumes/P5-707/B2Go-Workstation/P5-Workstation-707-Install.pkg to / 2022-07-13 18:12:01 : INFO : awb2go : Finishing... 2022-07-13 18:12:11 : INFO : awb2go : found packageID com.archiware.presstore installed, version 7.0.7 2022-07-13 18:12:11 : REQ : awb2go : Installed P5 Workstation, version 7.0.7 2022-07-13 18:12:12 : INFO : awb2go : App not closed, so no reopen. 2022-07-13 18:12:12 : REQ : awb2go : All done! 2022-07-13 18:12:12 : REQ : awb2go : ################## End Installomator, exit code 0 --- fragments/labels/awb2go.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 fragments/labels/awb2go.sh diff --git a/fragments/labels/awb2go.sh b/fragments/labels/awb2go.sh new file mode 100644 index 0000000..d626313 --- /dev/null +++ b/fragments/labels/awb2go.sh @@ -0,0 +1,10 @@ +awb2go) + name="P5 Workstation" + type="pkgInDmg" + packageID="com.archiware.presstore" + appNewVersion=$(curl -sf https://www.archiware.com/download-p5 | grep -m 1 "ARCHIWARE P5 Version" | sed "s|.*Version \(.*\) -.*|\\1|") + downloadURL=$(appNrVersion=`sed 's/[^0-9]//g' <<< $appNewVersion` && echo https://p5-downloads.s3.amazonaws.com/awpst"$appNrVersion"-darwin.dmg) + pkgName=$(appNrVersion=`sed 's/[^0-9]//g' <<< $appNewVersion` && echo P5-Workstation-"$appNrVersion"-Install.pkg) + expectedTeamID="5H5EU6F965" + # blockingProcesses=( nsd ) + ;; From 2a1b7056c91d56e64197d77eaf17df5a1a14a158 Mon Sep 17 00:00:00 2001 From: Fletcher Salesky Date: Thu, 28 Jul 2022 11:19:42 -0700 Subject: [PATCH 17/96] Create nudgesuite.sh --- fragments/labels/nudgesuite.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 fragments/labels/nudgesuite.sh diff --git a/fragments/labels/nudgesuite.sh b/fragments/labels/nudgesuite.sh new file mode 100644 index 0000000..1a50da1 --- /dev/null +++ b/fragments/labels/nudgesuite.sh @@ -0,0 +1,10 @@ +nudgesuite) + name="Nudge Suite" + appName="Nudge.app" + type="pkg" + downloadURL=$(downloadURLFromGit macadmins Nudge ) + appNewVersion=$(versionFromGit macadmins Nudge ) + expectedTeamID="9GQZ7KUFR6" + blockingProcesses=( "Nudge" ) + archiveName="Nudge_Suite-[0-9.]*.pkg" + ;; From 0460aa2724e3a4501fa09cf6c1f01bdc5afbc599 Mon Sep 17 00:00:00 2001 From: Fredrik Larsson Date: Fri, 29 Jul 2022 08:48:27 +0200 Subject: [PATCH 18/96] Created Zotero label Output: ``` 2022-07-29 08:44:17 : WARN : zotero : setting variable from argument DEBUG=0 2022-07-29 08:44:17 : REQ : zotero : ################## Start Installomator v. 10.0beta, date 2022-07-29 2022-07-29 08:44:17 : INFO : zotero : ################## Version: 10.0beta 2022-07-29 08:44:17 : INFO : zotero : ################## Date: 2022-07-29 2022-07-29 08:44:17 : INFO : zotero : ################## zotero 2022-07-29 08:44:18 : INFO : zotero : BLOCKING_PROCESS_ACTION=tell_user 2022-07-29 08:44:19 : INFO : zotero : NOTIFY=success 2022-07-29 08:44:19 : INFO : zotero : LOGGING=INFO 2022-07-29 08:44:19 : INFO : zotero : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-07-29 08:44:19 : INFO : zotero : Label type: dmg 2022-07-29 08:44:19 : INFO : zotero : archiveName: Zotero.dmg 2022-07-29 08:44:19 : INFO : zotero : no blocking processes defined, using Zotero as default 2022-07-29 08:44:19 : INFO : zotero : name: Zotero, appName: Zotero.app 2022-07-29 08:44:19 : WARN : zotero : No previous app found 2022-07-29 08:44:19 : WARN : zotero : could not find Zotero.app 2022-07-29 08:44:19 : INFO : zotero : appversion: 2022-07-29 08:44:19 : INFO : zotero : Latest version of Zotero is 6.0.11 2022-07-29 08:44:19 : REQ : zotero : Downloading https://www.zotero.org/download/client/dl?channel=release&platform=mac&version=6.0.11 to Zotero.dmg 2022-07-29 08:44:22 : REQ : zotero : no more blocking processes, continue with update 2022-07-29 08:44:22 : REQ : zotero : Installing Zotero 2022-07-29 08:44:22 : INFO : zotero : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.2kvEQHFJ/Zotero.dmg 2022-07-29 08:44:26 : INFO : zotero : Mounted: /Volumes/Zotero 2022-07-29 08:44:26 : INFO : zotero : Verifying: /Volumes/Zotero/Zotero.app 2022-07-29 08:44:32 : INFO : zotero : Team ID matching: 8LAYR367YV (expected: 8LAYR367YV ) 2022-07-29 08:44:32 : INFO : zotero : Installing Zotero version 6.0.11 on versionKey CFBundleShortVersionString. 2022-07-29 08:44:32 : INFO : zotero : App has LSMinimumSystemVersion: 10.9.0 2022-07-29 08:44:32 : INFO : zotero : Copy /Volumes/Zotero/Zotero.app to /Applications 2022-07-29 08:44:39 : WARN : zotero : Changing owner to kryptonit 2022-07-29 08:44:39 : INFO : zotero : Finishing... 2022-07-29 08:44:49 : INFO : zotero : App(s) found: /Applications/Zotero.app 2022-07-29 08:44:49 : INFO : zotero : found app at /Applications/Zotero.app, version 6.0.11, on versionKey CFBundleShortVersionString 2022-07-29 08:44:49 : REQ : zotero : Installed Zotero, version 6.0.11 2022-07-29 08:44:49 : INFO : zotero : notifying 2022-07-29 08:44:50 : INFO : zotero : App not closed, so no reopen. 2022-07-29 08:44:50 : REQ : zotero : All done! 2022-07-29 08:44:50 : REQ : zotero : ################## End Installomator, exit code 0 ``` --- fragments/labels/zotero.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 fragments/labels/zotero.sh diff --git a/fragments/labels/zotero.sh b/fragments/labels/zotero.sh new file mode 100644 index 0000000..ef54e67 --- /dev/null +++ b/fragments/labels/zotero.sh @@ -0,0 +1,8 @@ +zotero) + name="Zotero" + type="dmg" + downloadURL="https://www.zotero.org/download/client/dl?channel=release&platform=mac&version=$(curl -fs "https://www.zotero.org/download/" | grep -Eio '"mac":"(.*)' | cut -d '"' -f 4)" + expectedTeamID="8LAYR367YV" + appNewVersion=$(curl -fs "https://www.zotero.org/download/" | grep -Eio '"mac":"(.*)' | cut -d '"' -f 4) + #Company="Corporation for Digital Scholarship" + ;; From f124e2321b9090d83e0cbfcf1e43a2a30ec3f80f Mon Sep 17 00:00:00 2001 From: Fletcher Salesky Date: Wed, 17 Aug 2022 11:23:48 -0700 Subject: [PATCH 19/96] Create egnytecore.sh --- fragments/labels/egnytecore.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 fragments/labels/egnytecore.sh diff --git a/fragments/labels/egnytecore.sh b/fragments/labels/egnytecore.sh new file mode 100644 index 0000000..c22b22e --- /dev/null +++ b/fragments/labels/egnytecore.sh @@ -0,0 +1,9 @@ +egnytecore) + name="Egnyte Core" + appName="Egnyte.app" + type="dmg" + downloadURL=$(curl -fs "https://egnyte-cdn.egnyte.com/desktopapp/mac/en-us/versions/default.xml" | xpath '(//rss/channel/item/enclosure/@url)[1]' | cut -d '"' -f 2) + appNewVersion=$(curl -fs "https://egnyte-cdn.egnyte.com/desktopapp/mac/en-us/versions/default.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' | cut -d '"' -f 2) + expectedTeamID="FELUD555VC" + blockingProcesses=( NONE ) + ;; From 3d3114515aa2eb09b24348f3125b757f19e0f8ea Mon Sep 17 00:00:00 2001 From: Fletcher Salesky Date: Wed, 17 Aug 2022 15:28:26 -0700 Subject: [PATCH 20/96] Create zoomoutlookplugin.sh --- fragments/labels/zoomoutlookplugin.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 fragments/labels/zoomoutlookplugin.sh diff --git a/fragments/labels/zoomoutlookplugin.sh b/fragments/labels/zoomoutlookplugin.sh new file mode 100644 index 0000000..15d45d5 --- /dev/null +++ b/fragments/labels/zoomoutlookplugin.sh @@ -0,0 +1,10 @@ +zoomoutlookplugin) + name="Zoom Outlook Plugin" + appName="PluginLauncher.app" + targetDir="/Applications/ZoomOutlookPlugin" + type="pkg" + downloadURL="https://zoom.us/client/latest/ZoomMacOutlookPlugin.pkg" + appNewVersion="$(curl -fsIL ${downloadURL} | grep -i ^location | cut -d "/" -f5 | cut -d "." -f1-3)" + expectedTeamID="BJ4HAAB9B3" + blockingProcesses=( "PluginLauncher" ) + ;; From 7bf47ff9e5a391e6e80e85962ad6e835c57d1e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 19 Aug 2022 11:10:04 +0200 Subject: [PATCH 21/96] Dialog update when app is already at the latest version Not sure I use the correct values in the `updateDialog` call, but it works fine. --- fragments/main.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fragments/main.sh b/fragments/main.sh index 4cf42fb..94e67e0 100644 --- a/fragments/main.sh +++ b/fragments/main.sh @@ -155,6 +155,10 @@ if [[ -n $appNewVersion ]]; then printlog "notifying" displaynotification "$message" "No update for $name!" fi + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "complete" "Latest version already installed..." + sleep 2 + fi cleanupAndExit 0 "No newer version." REQ fi else From dcfd7d8328b56524084d81617dd085cd685128f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 19 Aug 2022 11:19:12 +0200 Subject: [PATCH 22/96] More Dialog messages --- fragments/functions.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fragments/functions.sh b/fragments/functions.sh index a14c406..ccf39c8 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -282,6 +282,10 @@ getAppVersion() { printlog "Replacing App Store apps, no matter the version" WARN appversion=0 else + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "wait" "Already installed from App Store. Not replaced." + sleep 4 + fi cleanupAndExit 23 "App previously installed from App Store, and we respect that" ERROR fi fi @@ -459,6 +463,10 @@ installAppWithPath() { # $1: path to app to install in $targetDir printlog "notifying" displaynotification "$message" "No update for $name!" fi + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "wait" "Latest version already installed..." + sleep 2 + fi cleanupAndExit 0 "No new version to install" REG else printlog "Using force to install anyway." @@ -625,6 +633,10 @@ installFromPKG() { printlog "notifying" displaynotification "$message" "No update for $name!" fi + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "wait" "Latest version already installed..." + sleep 2 + fi cleanupAndExit 0 "No new version to install" REQ else printlog "Using force to install anyway." From a8ba97b87e2ccb5700dcc2449d8d4cbd43d25fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 19 Aug 2022 15:08:42 +0200 Subject: [PATCH 23/96] One `$` too many --- fragments/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index ccf39c8..951669b 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -997,7 +997,7 @@ updateDialog() { fi # when to cmdfile is set, do nothing - if [[ $$cmd_file == "" ]]; then + if [[ $cmd_file == "" ]]; then return fi From d864c8e410febf549401f0977565a6b2c1399f52 Mon Sep 17 00:00:00 2001 From: Liam Steckler <553265+buckbanzai@users.noreply.github.com> Date: Fri, 19 Aug 2022 09:07:52 -0700 Subject: [PATCH 24/96] Add splashtopbusiness label --- fragments/labels/splashtopbusiness.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 fragments/labels/splashtopbusiness.sh diff --git a/fragments/labels/splashtopbusiness.sh b/fragments/labels/splashtopbusiness.sh new file mode 100644 index 0000000..76c8b0e --- /dev/null +++ b/fragments/labels/splashtopbusiness.sh @@ -0,0 +1,8 @@ +splashtopbusiness) + name="Splashtop Business" + type="pkgInDmg" + splashtopbusinessVersions=$(curl -fsL "https://www.splashtop.com/wp-content/themes/responsive/downloadx.php?product=stb&platform=mac-client") + downloadURL=$(getJSONValue "$splashtopbusinessVersions" "url") + appNewVersion="${${downloadURL#*INSTALLER_v}%*.dmg}" + expectedTeamID="CPQQ3AW49Y" + ;; \ No newline at end of file From faffd059dbf959395d966e4c31bb548a4263c5c7 Mon Sep 17 00:00:00 2001 From: Liam Steckler <553265+buckbanzai@users.noreply.github.com> Date: Fri, 19 Aug 2022 09:10:52 -0700 Subject: [PATCH 25/96] Add newline at end of file --- fragments/labels/splashtopbusiness.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/labels/splashtopbusiness.sh b/fragments/labels/splashtopbusiness.sh index 76c8b0e..e9da7fd 100644 --- a/fragments/labels/splashtopbusiness.sh +++ b/fragments/labels/splashtopbusiness.sh @@ -5,4 +5,4 @@ splashtopbusiness) downloadURL=$(getJSONValue "$splashtopbusinessVersions" "url") appNewVersion="${${downloadURL#*INSTALLER_v}%*.dmg}" expectedTeamID="CPQQ3AW49Y" - ;; \ No newline at end of file + ;; From 958cf59a64df52e6d5eb58e8877858ee91466095 Mon Sep 17 00:00:00 2001 From: speedybutters <31848713+speedybutters@users.noreply.github.com> Date: Mon, 22 Aug 2022 16:25:12 +0100 Subject: [PATCH 26/96] Create bitrix24.sh New label for Bitrix24 app. Couldn't find a way to specify appNewVersion, sorry. Output: sudo /Users/user/Documents/GitHub/Installomator/utils/assemble.sh bitrix24 DEBUG=0 Password: 2022-08-22 16:23:13 : INFO : bitrix24 : setting variable from argument DEBUG=0 2022-08-22 16:23:13 : REQ : bitrix24 : ################## Start Installomator v. 10.0beta1, date 2022-08-22 2022-08-22 16:23:13 : INFO : bitrix24 : ################## Version: 10.0beta1 2022-08-22 16:23:13 : INFO : bitrix24 : ################## Date: 2022-08-22 2022-08-22 16:23:13 : INFO : bitrix24 : ################## bitrix24 2022-08-22 16:23:13 : INFO : bitrix24 : BLOCKING_PROCESS_ACTION=tell_user 2022-08-22 16:23:13 : INFO : bitrix24 : NOTIFY=success 2022-08-22 16:23:13 : INFO : bitrix24 : LOGGING=INFO 2022-08-22 16:23:13 : INFO : bitrix24 : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-08-22 16:23:13 : INFO : bitrix24 : Label type: dmg 2022-08-22 16:23:13 : INFO : bitrix24 : archiveName: bitrix24_desktop.dmg 2022-08-22 16:23:13 : INFO : bitrix24 : name: Bitrix24, appName: Bitrix24.app 2022-08-22 16:23:13 : WARN : bitrix24 : No previous app found 2022-08-22 16:23:13 : WARN : bitrix24 : could not find Bitrix24.app 2022-08-22 16:23:13 : INFO : bitrix24 : appversion: 2022-08-22 16:23:13 : INFO : bitrix24 : Latest version not specified. 2022-08-22 16:23:13 : REQ : bitrix24 : Downloading https://dl.bitrix24.com/b24/bitrix24_desktop.dmg to bitrix24_desktop.dmg 2022-08-22 16:23:18 : REQ : bitrix24 : no more blocking processes, continue with update 2022-08-22 16:23:18 : REQ : bitrix24 : Installing Bitrix24 2022-08-22 16:23:18 : INFO : bitrix24 : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.DrdpdQ4H/bitrix24_desktop.dmg 2022-08-22 16:23:27 : INFO : bitrix24 : Mounted: /Volumes/Bitrix24 for macOS 2022-08-22 16:23:27 : INFO : bitrix24 : Verifying: /Volumes/Bitrix24 for macOS/Bitrix24.app updateDialog:26: no such file or directory: 2022-08-22 16:23:41 : INFO : bitrix24 : Team ID matching: 5B3T3A994N (expected: 5B3T3A994N ) 2022-08-22 16:23:41 : INFO : bitrix24 : Installing Bitrix24 version 14.0.16 on versionKey CFBundleShortVersionString. 2022-08-22 16:23:41 : INFO : bitrix24 : App has LSMinimumSystemVersion: 10.11 2022-08-22 16:23:41 : INFO : bitrix24 : Copy /Volumes/Bitrix24 for macOS/Bitrix24.app to /Applications 2022-08-22 16:23:54 : WARN : bitrix24 : Changing owner to adam updateDialog:26: no such file or directory: 2022-08-22 16:23:54 : INFO : bitrix24 : Finishing... 2022-08-22 16:23:57 : INFO : bitrix24 : App(s) found: /Applications/Bitrix24.app 2022-08-22 16:23:57 : INFO : bitrix24 : found app at /Applications/Bitrix24.app, version 14.0.16, on versionKey CFBundleShortVersionString 2022-08-22 16:23:57 : REQ : bitrix24 : Installed Bitrix24, version 14.0.16 2022-08-22 16:23:57 : INFO : bitrix24 : notifying 2022-08-22 16:23:58 : INFO : bitrix24 : App not closed, so no reopen. 2022-08-22 16:23:58 : REQ : bitrix24 : All done! 2022-08-22 16:23:58 : REQ : bitrix24 : ################## End Installomator, exit code 0 --- fragments/labels/bitrix24.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 fragments/labels/bitrix24.sh diff --git a/fragments/labels/bitrix24.sh b/fragments/labels/bitrix24.sh new file mode 100644 index 0000000..033cb81 --- /dev/null +++ b/fragments/labels/bitrix24.sh @@ -0,0 +1,8 @@ +bitrix24) + name="Bitrix24" + type="dmg" + archiveName="bitrix24_desktop.dmg" + downloadURL="https://dl.bitrix24.com/b24/bitrix24_desktop.dmg" + expectedTeamID="5B3T3A994N" + blockingProcesses=( "Bitrix24" ) + ;; \ No newline at end of file From f8b82a3c5f3380cdfebb2b23dae99039ea370432 Mon Sep 17 00:00:00 2001 From: speedybutters <31848713+speedybutters@users.noreply.github.com> Date: Mon, 22 Aug 2022 16:30:11 +0100 Subject: [PATCH 27/96] Create origin.sh New label for Origin app. Couldn't find a way to specify appNewVersion, sorry. Output: sudo /Users/user/Documents/GitHub/Installomator/utils/assemble.sh origin DEBUG=0 Password: 2022-08-22 16:29:17 : INFO : origin : setting variable from argument DEBUG=0 2022-08-22 16:29:17 : REQ : origin : ################## Start Installomator v. 10.0beta1, date 2022-08-22 2022-08-22 16:29:17 : INFO : origin : ################## Version: 10.0beta1 2022-08-22 16:29:17 : INFO : origin : ################## Date: 2022-08-22 2022-08-22 16:29:17 : INFO : origin : ################## origin 2022-08-22 16:29:17 : INFO : origin : BLOCKING_PROCESS_ACTION=tell_user 2022-08-22 16:29:17 : INFO : origin : NOTIFY=success 2022-08-22 16:29:17 : INFO : origin : LOGGING=INFO 2022-08-22 16:29:18 : INFO : origin : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-08-22 16:29:18 : INFO : origin : Label type: dmg 2022-08-22 16:29:18 : INFO : origin : archiveName: Origin.dmg 2022-08-22 16:29:18 : INFO : origin : App(s) found: /Applications/Origin.app 2022-08-22 16:29:18 : INFO : origin : found app at /Applications/Origin.app, version 10.5.113.50894, on versionKey CFBundleShortVersionString 2022-08-22 16:29:18 : INFO : origin : appversion: 10.5.113.50894 2022-08-22 16:29:18 : INFO : origin : Latest version not specified. 2022-08-22 16:29:18 : REQ : origin : Downloading https://www.dm.origin.com/mac/download/Origin.dmg to Origin.dmg 2022-08-22 16:29:23 : REQ : origin : no more blocking processes, continue with update 2022-08-22 16:29:23 : REQ : origin : Installing Origin 2022-08-22 16:29:23 : INFO : origin : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.ZcXEV9XX/Origin.dmg 2022-08-22 16:29:27 : INFO : origin : Mounted: /Volumes/Origin 2022-08-22 16:29:27 : INFO : origin : Verifying: /Volumes/Origin/Origin.app updateDialog:26: no such file or directory: 2022-08-22 16:29:29 : INFO : origin : Team ID matching: TSTV75T6Q5 (expected: TSTV75T6Q5 ) 2022-08-22 16:29:29 : INFO : origin : Downloaded version of Origin is 10.5.115.51547 on versionKey CFBundleShortVersionString (replacing version 10.5.113.50894). 2022-08-22 16:29:29 : INFO : origin : App has LSMinimumSystemVersion: 10.6 2022-08-22 16:29:29 : WARN : origin : Removing existing /Applications/Origin.app 2022-08-22 16:29:29 : INFO : origin : Copy /Volumes/Origin/Origin.app to /Applications 2022-08-22 16:29:31 : WARN : origin : Changing owner to adam updateDialog:26: no such file or directory: 2022-08-22 16:29:31 : INFO : origin : Finishing... 2022-08-22 16:29:34 : INFO : origin : App(s) found: /Applications/Origin.app 2022-08-22 16:29:34 : INFO : origin : found app at /Applications/Origin.app, version 10.5.115.51547, on versionKey CFBundleShortVersionString 2022-08-22 16:29:34 : REQ : origin : Installed Origin, version 10.5.115.51547 2022-08-22 16:29:34 : INFO : origin : notifying 2022-08-22 16:29:34 : INFO : origin : App not closed, so no reopen. 2022-08-22 16:29:34 : REQ : origin : All done! 2022-08-22 16:29:34 : REQ : origin : ################## End Installomator, exit code 0 --- fragments/labels/origin.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/origin.sh diff --git a/fragments/labels/origin.sh b/fragments/labels/origin.sh new file mode 100644 index 0000000..2fbdb90 --- /dev/null +++ b/fragments/labels/origin.sh @@ -0,0 +1,7 @@ +origin) + name="Origin" + type="dmg" + downloadURL="https://www.dm.origin.com/mac/download/Origin.dmg" + expectedTeamID="TSTV75T6Q5" + blockingProcesses=( "Origin" ) + ;; \ No newline at end of file From 6db51a0ab146799bee3ceb224a56eb4959a48890 Mon Sep 17 00:00:00 2001 From: Sylvain Roche <5450786+niavlysAO@users.noreply.github.com> Date: Tue, 23 Aug 2022 12:20:47 +0200 Subject: [PATCH 28/96] label screamingfrogspider.sh fix, dmg per arch ScreamingFrogSpider now has different dmg per CPU arch. Download page provides 2 dmg links, therefore we must fix downloadURL grep --- fragments/labels/screamingfrogseospider.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fragments/labels/screamingfrogseospider.sh b/fragments/labels/screamingfrogseospider.sh index 1a2aaf6..39ab342 100644 --- a/fragments/labels/screamingfrogseospider.sh +++ b/fragments/labels/screamingfrogseospider.sh @@ -1,7 +1,12 @@ screamingfrogseospider) name="Screaming Frog SEO Spider" type="dmg" - downloadURL=$(curl -fs "https://www.screamingfrog.co.uk/wp-content/themes/screamingfrog/inc/download-modal.php" | grep -i -o "https.*\.dmg" | head -1) + if [[ $(arch) == i386 ]]; then + platform="Mac - (intel)" + elif [[ $(arch) == arm64 ]]; then + platform="Mac - (apple silicon)" + fi + downloadURL=$(curl -fs "https://www.screamingfrog.co.uk/wp-content/themes/screamingfrog/inc/download-modal.php" | grep "${platform}" | grep -i -o "https.*\.dmg" | head -1) appNewVersion=$(print "$downloadURL" | sed -E 's/https.*\/[a-zA-Z]*-([0-9.]*)\.dmg/\1/g')".0" expectedTeamID="CAHEVC3HZC" ;; From cabe867b30e164ad73492db5662130132b8638a5 Mon Sep 17 00:00:00 2001 From: meschwartz <57272629+meschwartz@users.noreply.github.com> Date: Thu, 25 Aug 2022 13:32:28 -0400 Subject: [PATCH 29/96] Created new label for Charles Proxy Output: ``` # ./Installomator/utils/assemble.sh charles DEBUG=0 2022-08-25 13:31:09 : INFO : charles : setting variable from argument DEBUG=0 2022-08-25 13:31:09 : REQ : charles : ################## Start Installomator v. 10.0beta1, date 2022-08-25 2022-08-25 13:31:09 : INFO : charles : ################## Version: 10.0beta1 2022-08-25 13:31:10 : INFO : charles : ################## Date: 2022-08-25 2022-08-25 13:31:10 : INFO : charles : ################## charles 2022-08-25 13:31:10 : INFO : charles : SwiftDialog is not installed, clear cmd file var 2022-08-25 13:31:10 : INFO : charles : BLOCKING_PROCESS_ACTION=tell_user 2022-08-25 13:31:10 : INFO : charles : NOTIFY=success 2022-08-25 13:31:10 : INFO : charles : LOGGING=INFO 2022-08-25 13:31:10 : INFO : charles : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-08-25 13:31:10 : INFO : charles : Label type: dmg 2022-08-25 13:31:10 : INFO : charles : archiveName: Charles.dmg 2022-08-25 13:31:10 : INFO : charles : no blocking processes defined, using Charles as default 2022-08-25 13:31:10 : INFO : charles : name: Charles, appName: Charles.app 2022-08-25 13:31:10 : WARN : charles : No previous app found 2022-08-25 13:31:10 : WARN : charles : could not find Charles.app 2022-08-25 13:31:10 : INFO : charles : appversion: 2022-08-25 13:31:10 : INFO : charles : Latest version of Charles is 4.6.2 2022-08-25 13:31:10 : REQ : charles : Downloading https://www.charlesproxy.com/assets/release/4.6.2/charles-proxy-4.6.2.dmg to Charles.dmg 2022-08-25 13:31:32 : REQ : charles : no more blocking processes, continue with update 2022-08-25 13:31:32 : REQ : charles : Installing Charles 2022-08-25 13:31:32 : INFO : charles : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.MO2B5ihQ/Charles.dmg 2022-08-25 13:31:37 : INFO : charles : Mounted: /Volumes/Charles Proxy v4.6.2 2022-08-25 13:31:37 : INFO : charles : Verifying: /Volumes/Charles Proxy v4.6.2/Charles.app updateDialog:26: no such file or directory: 2022-08-25 13:31:45 : INFO : charles : Team ID matching: 9A5PCU4FSD (expected: 9A5PCU4FSD ) 2022-08-25 13:31:45 : INFO : charles : Installing Charles version 4.6.2 on versionKey CFBundleShortVersionString. 2022-08-25 13:31:45 : INFO : charles : App has LSMinimumSystemVersion: 10.7 2022-08-25 13:31:45 : INFO : charles : Copy /Volumes/Charles Proxy v4.6.2/Charles.app to /Applications 2022-08-25 13:31:46 : WARN : charles : Changing owner to schwartzm updateDialog:26: no such file or directory: 2022-08-25 13:31:46 : INFO : charles : Finishing... 2022-08-25 13:31:49 : INFO : charles : App(s) found: /Applications/Charles.app 2022-08-25 13:31:49 : INFO : charles : found app at /Applications/Charles.app, version 4.6.2, on versionKey CFBundleShortVersionString 2022-08-25 13:31:49 : REQ : charles : Installed Charles, version 4.6.2 2022-08-25 13:31:49 : INFO : charles : notifying 2022-08-25 13:31:49 : INFO : charles : App not closed, so no reopen. 2022-08-25 13:31:49 : REQ : charles : All done! 2022-08-25 13:31:49 : REQ : charles : ################## End Installomator, exit code 0 ``` --- fragments/labels/charles.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/charles.sh diff --git a/fragments/labels/charles.sh b/fragments/labels/charles.sh new file mode 100644 index 0000000..0c70782 --- /dev/null +++ b/fragments/labels/charles.sh @@ -0,0 +1,7 @@ +charles) + name="Charles" + type="dmg" + appNewVersion=$(curl -fs https://www.charlesproxy.com/download/latest-release/ | sed -nE 's/.*version.*value="([^"]*).*/\1/p') + downloadURL="https://www.charlesproxy.com/assets/release/$appNewVersion/charles-proxy-$appNewVersion.dmg" + expectedTeamID="9A5PCU4FSD" + ;; \ No newline at end of file From d18fd7f22113d4a6fc46c54320270e1595400641 Mon Sep 17 00:00:00 2001 From: Fletcher Salesky Date: Sat, 27 Aug 2022 02:57:27 -0700 Subject: [PATCH 30/96] Create polylens.sh --- fragments/labels/polylens.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/polylens.sh diff --git a/fragments/labels/polylens.sh b/fragments/labels/polylens.sh new file mode 100644 index 0000000..54cd0b3 --- /dev/null +++ b/fragments/labels/polylens.sh @@ -0,0 +1,7 @@ +polylens) + name="Poly Lens" + type="dmg" + appNewVersion=$(curl -fs "https://info.lens.poly.com/lens-dt-rn/atom.xml" | grep "Version" | head -1 | cut -d "[" -f3 | sed 's/Version //g' | sed 's/]]\>\<\/title\>//g') + downloadURL="https://swupdate.lens.poly.com/lens-desktop-mac/$appNewVersion/$appNewVersion/PolyLens-$appNewVersion.dmg" + expectedTeamID="SKWK2Q7JJV" + ;; From 95bd32769c34b0df98bd75c915670cfa080b21eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 2 Sep 2022 14:57:04 +0200 Subject: [PATCH 31/96] Update acroniscyberprotectconnectagent.sh `blockingProcesses=( NONE )` --- fragments/labels/acroniscyberprotectconnectagent.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/fragments/labels/acroniscyberprotectconnectagent.sh b/fragments/labels/acroniscyberprotectconnectagent.sh index 7155b6a..8310357 100644 --- a/fragments/labels/acroniscyberprotectconnectagent.sh +++ b/fragments/labels/acroniscyberprotectconnectagent.sh @@ -7,4 +7,5 @@ remotixagent) versionKey="CFBundleVersion" appNewVersion=$(curl -fsIL "${downloadURL}" | grep -i "^location" | sed -E 's/.*\/[a-zA-Z]*-[0-9.]*-([0-9.]*)\.pkg/\1/g') expectedTeamID="H629V387SY" + blockingProcesses=( NONE ) ;; From 0c4d7b0c56176b14e0b458f7176180a3382612c9 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Fri, 2 Sep 2022 15:22:35 +0200 Subject: [PATCH 32/96] Update version.sh --- fragments/version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/version.sh b/fragments/version.sh index 0525adb..a243768 100644 --- a/fragments/version.sh +++ b/fragments/version.sh @@ -1 +1 @@ -10.0beta2 +10.0beta3 From 7239ec454a591490154ffedb9716f1ce6871053a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Mon, 5 Sep 2022 10:04:33 +0200 Subject: [PATCH 33/96] Change `appNewVersion` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub tag contain “_” and not “.” so our function fails to get the right version, so isolating it out from the `downloadURL`. --- fragments/labels/xcreds.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fragments/labels/xcreds.sh b/fragments/labels/xcreds.sh index 4035dd4..5422f1f 100644 --- a/fragments/labels/xcreds.sh +++ b/fragments/labels/xcreds.sh @@ -1,11 +1,11 @@ xcreds) name="XCreds" - #type="pkgInZip" + type="pkg" #packageID="com.twocanoes.pkg.secureremoteaccess" #downloadURL=$(curl -fs "https://twocanoes.com/products/mac/xcreds/" | grep -ioE "https://.*\.zip" | head -1) #appNewVersion=$(curl -fs "https://twocanoes.com/products/mac/xcreds/" | grep -io "Current Version:.*" | sed -E 's/.*XCreds *([0-9.]*)<.*/\1/g') - type="pkg" downloadURL="$(downloadURLFromGit twocanoes xcreds)" - appNewVersion="$(versionFromGit twocanoes xcreds)" + #appNewVersion="$(versionFromGit twocanoes xcreds)" # GitHub tag contain “_” and not “.” so our function fails to get the right version + appNewVersion=$(echo "$downloadURL" | sed -E 's/.*XCreds_.*-([0-9.]*)\.pkg/\1/') expectedTeamID="UXP6YEHSPW" ;; From 776c955cddbf4a634594670c901151ce60d0e655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Mon, 5 Sep 2022 10:17:09 +0200 Subject: [PATCH 34/96] Comments to label --- fragments/labels/xcreds.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fragments/labels/xcreds.sh b/fragments/labels/xcreds.sh index 5422f1f..8a71fd0 100644 --- a/fragments/labels/xcreds.sh +++ b/fragments/labels/xcreds.sh @@ -1,9 +1,12 @@ xcreds) name="XCreds" - type="pkg" + # Downloading from twocanoes homepage + #type="pkgInDmg" #packageID="com.twocanoes.pkg.secureremoteaccess" #downloadURL=$(curl -fs "https://twocanoes.com/products/mac/xcreds/" | grep -ioE "https://.*\.zip" | head -1) #appNewVersion=$(curl -fs "https://twocanoes.com/products/mac/xcreds/" | grep -io "Current Version:.*" | sed -E 's/.*XCreds *([0-9.]*)<.*/\1/g') + # GitHub download + type="pkg" downloadURL="$(downloadURLFromGit twocanoes xcreds)" #appNewVersion="$(versionFromGit twocanoes xcreds)" # GitHub tag contain “_” and not “.” so our function fails to get the right version appNewVersion=$(echo "$downloadURL" | sed -E 's/.*XCreds_.*-([0-9.]*)\.pkg/\1/') From 527490e72f7bb8e8d75e2d5fc4b557feb9d33aa5 Mon Sep 17 00:00:00 2001 From: Fredrik Larsson Date: Mon, 12 Sep 2022 14:51:56 +0200 Subject: [PATCH 35/96] New Label: LaTeXiT 2022-09-12 14:49:00 : INFO : latexit : setting variable from argument NOTIFY=silent 2022-09-12 14:49:00 : INFO : latexit : setting variable from argument DEBUG=0 2022-09-12 14:49:00 : REQ : latexit : ################## Start Installomator v. 10.0beta3, date 2022-09-12 2022-09-12 14:49:00 : INFO : latexit : ################## Version: 10.0beta3 2022-09-12 14:49:00 : INFO : latexit : ################## Date: 2022-09-12 2022-09-12 14:49:00 : INFO : latexit : ################## latexit 2022-09-12 14:49:00 : INFO : latexit : SwiftDialog is not installed, clear cmd file var 2022-09-12 14:49:01 : INFO : latexit : BLOCKING_PROCESS_ACTION=tell_user 2022-09-12 14:49:01 : INFO : latexit : NOTIFY=silent 2022-09-12 14:49:01 : INFO : latexit : LOGGING=INFO 2022-09-12 14:49:01 : INFO : latexit : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-09-12 14:49:01 : INFO : latexit : Label type: dmg 2022-09-12 14:49:01 : INFO : latexit : archiveName: LaTeXiT.dmg 2022-09-12 14:49:01 : INFO : latexit : no blocking processes defined, using LaTeXiT as default 2022-09-12 14:49:01 : INFO : latexit : name: LaTeXiT, appName: LaTeXiT.app 2022-09-12 14:49:01 : WARN : latexit : No previous app found 2022-09-12 14:49:01 : WARN : latexit : could not find LaTeXiT.app 2022-09-12 14:49:01 : INFO : latexit : appversion: 2022-09-12 14:49:01 : INFO : latexit : Latest version of LaTeXiT is 2.16.4 2022-09-12 14:49:01 : REQ : latexit : Downloading https://pierre.chachatelier.fr/latexit/downloads/LaTeXiT-2_16_4.dmg to LaTeXiT.dmg 2022-09-12 14:49:03 : REQ : latexit : no more blocking processes, continue with update 2022-09-12 14:49:04 : REQ : latexit : Installing LaTeXiT 2022-09-12 14:49:04 : INFO : latexit : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.p6c9hBly/LaTeXiT.dmg 2022-09-12 14:49:07 : INFO : latexit : Mounted: /Volumes/LaTeXiT 2.16.4 1 2022-09-12 14:49:07 : INFO : latexit : Verifying: /Volumes/LaTeXiT 2.16.4 1/LaTeXiT.app 2022-09-12 14:49:08 : INFO : latexit : Team ID matching: 7SFX84GNR7 (expected: 7SFX84GNR7 ) 2022-09-12 14:49:08 : INFO : latexit : Installing LaTeXiT version 2.16.4 on versionKey CFBundleShortVersionString. 2022-09-12 14:49:08 : INFO : latexit : App has LSMinimumSystemVersion: 10.9 2022-09-12 14:49:08 : INFO : latexit : Copy /Volumes/LaTeXiT 2.16.4 1/LaTeXiT.app to /Applications 2022-09-12 14:49:12 : WARN : latexit : Changing owner to kryptonit 2022-09-12 14:49:13 : INFO : latexit : Finishing... 2022-09-12 14:49:16 : INFO : latexit : App(s) found: /Applications/LaTeXiT.app 2022-09-12 14:49:16 : INFO : latexit : found app at /Applications/LaTeXiT.app, version 2.16.4, on versionKey CFBundleShortVersionString 2022-09-12 14:49:16 : REQ : latexit : Installed LaTeXiT, version 2.16.4 2022-09-12 14:49:16 : INFO : latexit : App not closed, so no reopen. 2022-09-12 14:49:16 : REQ : latexit : All done! 2022-09-12 14:49:16 : REQ : latexit : ################## End Installomator, exit code 0 --- fragments/labels/latexit.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/latexit.sh diff --git a/fragments/labels/latexit.sh b/fragments/labels/latexit.sh new file mode 100644 index 0000000..c6a91f9 --- /dev/null +++ b/fragments/labels/latexit.sh @@ -0,0 +1,7 @@ +latexit) + name="LaTeXiT" + type="dmg" + downloadURL="$(curl -fs "https://pierre.chachatelier.fr/latexit/downloads/latexit-sparkle-en.rss" | xpath '(//rss/channel/item/enclosure/@url)[last()]' 2>/dev/null | cut -d '"' -f 2)" + appNewVersion="$(curl -fs "https://pierre.chachatelier.fr/latexit/downloads/latexit-sparkle-en.rss" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[last()]' 2>/dev/null | cut -d '"' -f 2)" + expectedTeamID="7SFX84GNR7" + ;; From 22170a89ae5411030b3c664d20921de299ab91a6 Mon Sep 17 00:00:00 2001 From: Adam Codega Date: Mon, 12 Sep 2022 12:37:11 -0400 Subject: [PATCH 36/96] Swap Adobe URL parsing filter The filters for ARM and Intel were swapped by accident, this correctly returns the ARM URL for ARM and Intel URL for Intel. --- fragments/labels/adobecreativeclouddesktop.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/adobecreativeclouddesktop.sh b/fragments/labels/adobecreativeclouddesktop.sh index 95582db..54eabdb 100644 --- a/fragments/labels/adobecreativeclouddesktop.sh +++ b/fragments/labels/adobecreativeclouddesktop.sh @@ -4,9 +4,9 @@ adobecreativeclouddesktop) type="dmg" adobeurl="https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" if [[ $(arch) == "arm64" ]]; then - downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'osx10')][contains(text(),'Download')]/@href)" - 2> /dev/null) - elif [[ $(arch) == "i386" ]]; then downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'macarm64')][contains(text(),'Download')]/@href)" - 2> /dev/null) + elif [[ $(arch) == "i386" ]]; then + downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'osx10')][contains(text(),'Download')]/@href)" - 2> /dev/null) fi #downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*dmg" | head -1) appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2) From cd2637d30f417bf9043310c1619465042e47a3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Tue, 13 Sep 2022 09:05:04 +0200 Subject: [PATCH 37/96] =?UTF-8?q?Verify=20for=20=E2=80=9CAdobe=20Installer?= =?UTF-8?q?=E2=80=9D=20before=20running?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also added another option for getting current version that we could consider using. Removed some old stuff already commented out. --- fragments/labels/adobecreativeclouddesktop.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fragments/labels/adobecreativeclouddesktop.sh b/fragments/labels/adobecreativeclouddesktop.sh index 54eabdb..c83da57 100644 --- a/fragments/labels/adobecreativeclouddesktop.sh +++ b/fragments/labels/adobecreativeclouddesktop.sh @@ -1,15 +1,19 @@ adobecreativeclouddesktop) name="Adobe Creative Cloud" - #appName="Install.app" type="dmg" + if pgrep -q "Adobe Installer"; then + printlog "Adobe Installer is running, not a good time to update." WARN + printlog "################## End $APPLICATION \n\n" INFO + exit 75 + fi adobeurl="https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" if [[ $(arch) == "arm64" ]]; then downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'macarm64')][contains(text(),'Download')]/@href)" - 2> /dev/null) elif [[ $(arch) == "i386" ]]; then downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'osx10')][contains(text(),'Download')]/@href)" - 2> /dev/null) fi - #downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*dmg" | head -1) appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2) + #appNewVersion=$(echo "$downloadURL" | grep -o '[^x]*$' | cut -d '.' -f 1 | sed 's/_/\./g') installerTool="Install.app" CLIInstaller="Install.app/Contents/MacOS/Install" CLIArguments=(--mode=silent) From 4e003b22924e5dda27086362c341c3b8d2d89c8b Mon Sep 17 00:00:00 2001 From: Fredrik Larsson Date: Tue, 13 Sep 2022 11:29:16 +0200 Subject: [PATCH 38/96] New Label: Cytoscape 2022-09-13 11:18:47 : REQ : cytoscape : ################## Start Installomator v. 10.0beta3, date 2022-09-13 2022-09-13 11:18:47 : INFO : cytoscape : ################## Version: 10.0beta3 2022-09-13 11:18:47 : INFO : cytoscape : ################## Date: 2022-09-13 2022-09-13 11:18:47 : INFO : cytoscape : ################## cytoscape 2022-09-13 11:18:47 : INFO : cytoscape : SwiftDialog is not installed, clear cmd file var 2022-09-13 11:18:49 : INFO : cytoscape : BLOCKING_PROCESS_ACTION=tell_user 2022-09-13 11:18:49 : INFO : cytoscape : NOTIFY=success 2022-09-13 11:18:50 : INFO : cytoscape : LOGGING=INFO 2022-09-13 11:18:50 : INFO : cytoscape : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-09-13 11:18:50 : INFO : cytoscape : Label type: dmg 2022-09-13 11:18:50 : INFO : cytoscape : archiveName: Cytoscape.dmg 2022-09-13 11:18:50 : INFO : cytoscape : no blocking processes defined, using Cytoscape as default 2022-09-13 11:18:50 : INFO : cytoscape : name: Cytoscape, appName: Cytoscape.app 2022-09-13 11:18:50 : WARN : cytoscape : No previous app found 2022-09-13 11:18:50 : WARN : cytoscape : could not find Cytoscape.app 2022-09-13 11:18:50 : INFO : cytoscape : appversion: 2022-09-13 11:18:50 : INFO : cytoscape : Latest version of Cytoscape is 3.9.1 2022-09-13 11:18:50 : REQ : cytoscape : Downloading https://github.com/cytoscape/cytoscape/releases/download/3.9.1/Cytoscape_3_9_1_macos.dmg to Cytoscape.dmg 2022-09-13 11:19:12 : REQ : cytoscape : no more blocking processes, continue with update 2022-09-13 11:19:12 : REQ : cytoscape : Installing Cytoscape 2022-09-13 11:19:12 : REQ : cytoscape : installerTool used: Cytoscape Installer.app 2022-09-13 11:19:12 : INFO : cytoscape : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.zwfhpav8/Cytoscape.dmg 2022-09-13 11:19:13 : INFO : cytoscape : Mounted: /Volumes/Cytoscape 1 2022-09-13 11:19:13 : INFO : cytoscape : Verifying: /Volumes/Cytoscape 1/Cytoscape Installer.app 2022-09-13 11:19:14 : INFO : cytoscape : Team ID matching: 35LDCJ33QT (expected: 35LDCJ33QT ) 2022-09-13 11:19:14 : INFO : cytoscape : Installing Cytoscape version 3.9.1 on versionKey CFBundleShortVersionString. 2022-09-13 11:19:14 : INFO : cytoscape : App has LSMinimumSystemVersion: 10.7.3 2022-09-13 11:19:14 : INFO : cytoscape : CLIInstaller exists, running installer command /Volumes/Cytoscape 1/Cytoscape Installer.app/Contents/MacOS/JavaApplicationStub -q 2022-09-13 11:19:49 : INFO : cytoscape : Succesfully ran /Volumes/Cytoscape 1/Cytoscape Installer.app/Contents/MacOS/JavaApplicationStub -q 2022-09-13 11:19:49 : INFO : cytoscape : Finishing... 2022-09-13 11:19:52 : INFO : cytoscape : name: Cytoscape, appName: Cytoscape Installer.app 2022-09-13 11:19:52 : INFO : cytoscape : App(s) found: /Applications/Cytoscape_v3.9.1/Cytoscape Uninstaller.app/Applications/Cytoscape_v3.9.1/Cytoscape.app 2022-09-13 11:19:52 : WARN : cytoscape : could not determine location of Cytoscape Installer.app 2022-09-13 11:19:52 : REQ : cytoscape : Installed Cytoscape 2022-09-13 11:19:52 : INFO : cytoscape : notifying 2022-09-13 11:19:53 : INFO : cytoscape : App not closed, so no reopen. 2022-09-13 11:19:53 : REQ : cytoscape : All done! 2022-09-13 11:19:53 : REQ : cytoscape : ################## End Installomator, exit code 0 --- fragments/labels/cytoscape.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 fragments/labels/cytoscape.sh diff --git a/fragments/labels/cytoscape.sh b/fragments/labels/cytoscape.sh new file mode 100644 index 0000000..7b722ef --- /dev/null +++ b/fragments/labels/cytoscape.sh @@ -0,0 +1,11 @@ +cytoscape) + name="Cytoscape" + #appName="Cytoscape Installer.app" + type="dmg" + downloadURL="$(downloadURLFromGit cytoscape cytoscape)" + appNewVersion="$(versionFromGit cytoscape cytoscape)" + installerTool="Cytoscape Installer.app" + CLIInstaller="Cytoscape Installer.app/Contents/MacOS/JavaApplicationStub" + CLIArguments=(-q) + expectedTeamID="35LDCJ33QT" + ;; From 13d574bd0db749ca24c7eae7933c3f4a477e5a5f Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 14 Sep 2022 10:31:06 +0200 Subject: [PATCH 39/96] Create gfxcardstatus.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Text run: ``` % utils/assemble.sh gfxcardstatus DEBUG=2 2022-09-14 10:26:07 : INFO : gfxcardstatus : setting variable from argument DEBUG=2 2022-09-14 10:26:07 : REQ : gfxcardstatus : ################## Start Installomator v. 10.0beta3, date 2022-09-14 2022-09-14 10:26:07 : INFO : gfxcardstatus : ################## Version: 10.0beta3 2022-09-14 10:26:07 : INFO : gfxcardstatus : ################## Date: 2022-09-14 2022-09-14 10:26:07 : INFO : gfxcardstatus : ################## gfxcardstatus 2022-09-14 10:26:07 : DEBUG : gfxcardstatus : DEBUG mode 2 enabled. 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : name=gfxCardStatus 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : appName= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : type=zip 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : archiveName= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : downloadURL=https://github.com/codykrieger/gfxCardStatus/releases/download/v2.5/gfxCardStatus-2.5.zip 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : curlOptions= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : appNewVersion=2.5 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : appCustomVersion function: Not defined 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : versionKey=CFBundleShortVersionString 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : packageID= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : pkgName= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : choiceChangesXML= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : expectedTeamID=LF22FTQC25 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : blockingProcesses= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : installerTool= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : CLIInstaller= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : CLIArguments= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : updateTool= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : updateToolArguments= 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : updateToolRunAsCurrentUser= 2022-09-14 10:26:08 : INFO : gfxcardstatus : BLOCKING_PROCESS_ACTION=tell_user 2022-09-14 10:26:08 : INFO : gfxcardstatus : NOTIFY=success 2022-09-14 10:26:08 : INFO : gfxcardstatus : LOGGING=DEBUG 2022-09-14 10:26:08 : INFO : gfxcardstatus : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-09-14 10:26:08 : INFO : gfxcardstatus : Label type: zip 2022-09-14 10:26:08 : INFO : gfxcardstatus : archiveName: gfxCardStatus.zip 2022-09-14 10:26:08 : INFO : gfxcardstatus : no blocking processes defined, using gfxCardStatus as default 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : Changing directory to /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.cR1129g6 2022-09-14 10:26:08 : INFO : gfxcardstatus : name: gfxCardStatus, appName: gfxCardStatus.app 2022-09-14 10:26:08 : INFO : gfxcardstatus : App(s) found: /Users/st/Downloads/2022-09-14-10-21-02/gfxCardStatus.app 2022-09-14 10:26:08 : WARN : gfxcardstatus : could not determine location of gfxCardStatus.app 2022-09-14 10:26:08 : INFO : gfxcardstatus : appversion: 2022-09-14 10:26:08 : INFO : gfxcardstatus : Latest version of gfxCardStatus is 2.5 2022-09-14 10:26:08 : REQ : gfxcardstatus : Downloading https://github.com/codykrieger/gfxCardStatus/releases/download/v2.5/gfxCardStatus-2.5.zip to gfxCardStatus.zip 2022-09-14 10:26:08 : DEBUG : gfxcardstatus : No Dialog connection, just download 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : File list: -rw-r--r-- 1 st staff 2,2M 14 Sep 10:26 gfxCardStatus.zip 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : File type: gfxCardStatus.zip: Zip archive data, at least v1.0 to extract, compression method=store 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : curl output was: * Trying 140.82.121.3:443... * Connected to github.com (140.82.121.3) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/cert.pem * CApath: none … * Connection #1 to host objects.githubusercontent.com left intact 2022-09-14 10:26:10 : REQ : gfxcardstatus : no more blocking processes, continue with update 2022-09-14 10:26:10 : REQ : gfxcardstatus : Installing gfxCardStatus 2022-09-14 10:26:10 : INFO : gfxcardstatus : Unzipping gfxCardStatus.zip 2022-09-14 10:26:10 : INFO : gfxcardstatus : Verifying: /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.cR1129g6/gfxCardStatus.app 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : App size: 5,5M /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.cR1129g6/gfxCardStatus.app 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : Debugging enabled, App Verification output was: /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.cR1129g6/gfxCardStatus.app: accepted source=Notarized Developer ID origin=Developer ID Application: Cody Krieger (LF22FTQC25) 2022-09-14 10:26:10 : INFO : gfxcardstatus : Team ID matching: LF22FTQC25 (expected: LF22FTQC25 ) 2022-09-14 10:26:10 : INFO : gfxcardstatus : Installing gfxCardStatus version 2.5 on versionKey CFBundleShortVersionString. 2022-09-14 10:26:10 : INFO : gfxcardstatus : App has LSMinimumSystemVersion: 10.9 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : DEBUG mode 2 enabled, not installing anything, exiting 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : Deleting /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.cR1129g6 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : Debugging enabled, Deleting tmpDir output was: /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.cR1129g6/gfxCardStatus.app/Contents/CodeResources … 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.cR1129g6/gfxCardStatus.app 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.cR1129g6/gfxCardStatus.zip 2022-09-14 10:26:10 : DEBUG : gfxcardstatus : /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.cR1129g6 2022-09-14 10:26:11 : INFO : gfxcardstatus : App not closed, so no reopen. 2022-09-14 10:26:11 : INFO : gfxcardstatus : 2022-09-14 10:26:11 : REQ : gfxcardstatus : ################## End Installomator, exit code 0 ``` --- fragments/labels/gfxcardstatus.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/gfxcardstatus.sh diff --git a/fragments/labels/gfxcardstatus.sh b/fragments/labels/gfxcardstatus.sh new file mode 100644 index 0000000..84a3422 --- /dev/null +++ b/fragments/labels/gfxcardstatus.sh @@ -0,0 +1,7 @@ +gfxcardstatus) + name="gfxCardStatus" + type="zip" + downloadURL="$(downloadURLFromGit codykrieger gfxCardStatus)" + appNewVersion="$(versionFromGit codykrieger gfxCardStatus)" + expectedTeamID="LF22FTQC25" + ;; From 1412f86e69877fd668471616d26abce11769e193 Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 14 Sep 2022 15:45:00 +0200 Subject: [PATCH 40/96] If GItHub does not give an URL we can fall back on API call Today something strange happened for Installomator on GitHub. Or latest release would spend too much time loading the assets, and would not return an URL, like here: ``` % gitusername="Installomator"; gitreponame="Installomator"; curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.pkg" | head -1 % gitusername="bartreardon"; gitreponame="swiftDialog"; curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.pkg" | head -1 /bartreardon/swiftDialog/releases/download/v1.11.2/dialog-1.11.2-3095.pkg ``` As can be seen above it worked for swiftDialog, but not for Installomator. Now we can fall back on the API call if we do not get the URL in first try. --- fragments/functions.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index 0da3726..cec20b2 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -162,11 +162,17 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name fi if [ -n "$archiveName" ]; then - #downloadURL=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) + if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") + fi else - #downloadURL=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1) + if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") + fi fi if [ -z "$downloadURL" ]; then cleanupAndExit 14 "could not retrieve download URL for $gitusername/$gitreponame" ERROR From e5d309a9d9ec8a000b920a2f4966f6b4b21b6df9 Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 14 Sep 2022 16:19:57 +0200 Subject: [PATCH 41/96] Minor correction to the `if` statement --- fragments/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index cec20b2..85a7902 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -163,7 +163,7 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name if [ -n "$archiveName" ]; then downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) - if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + if [[ "$(echo $downloadURL | grep -ioE "https.*$archiveName")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") fi From a01bfd7dae9be201a20deb15be2d0aacd10f89d2 Mon Sep 17 00:00:00 2001 From: Fletcher Salesky Date: Wed, 14 Sep 2022 16:25:56 -0700 Subject: [PATCH 42/96] Update obs.sh --- fragments/labels/obs.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fragments/labels/obs.sh b/fragments/labels/obs.sh index 4685446..d932046 100644 --- a/fragments/labels/obs.sh +++ b/fragments/labels/obs.sh @@ -1,7 +1,12 @@ obs) - # credit: Gabe Marchan (gabemarchan.com - @darklink87) name="OBS" type="dmg" - downloadURL=$(curl -fs "https://obsproject.com/download" | awk -F '"' "/dmg/ {print \$10}") + if [[ $(arch) == "arm64" ]]; then + archiveName="obs-studio-[0-9.]*-macos-arm64.dmg" + elif [[ $(arch) == "i386" ]]; then + archiveName="obs-studio-[0-9.]*-macos-x86_64.dmg" + fi + downloadURL=$(downloadURLFromGit obsproject obs-studio ) + appNewVersion=$(versionFromGit obsproject obs-studio ) expectedTeamID="2MMRE5MTB8" ;; From 57ed4e77f4ab197076c468ac114a2d9b4ab8aded Mon Sep 17 00:00:00 2001 From: Fletcher Salesky Date: Wed, 14 Sep 2022 16:34:03 -0700 Subject: [PATCH 43/96] Move archiveName before downloadURL --- fragments/labels/nudge.sh | 3 ++- fragments/labels/nudgesuite.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fragments/labels/nudge.sh b/fragments/labels/nudge.sh index 804872d..aafacad 100644 --- a/fragments/labels/nudge.sh +++ b/fragments/labels/nudge.sh @@ -1,8 +1,9 @@ nudge) name="Nudge" type="pkg" + archiveName="Nudge-[0-9.]*.pkg" downloadURL=$(downloadURLFromGit macadmins Nudge ) appNewVersion=$(versionFromGit macadmins Nudge ) expectedTeamID="9GQZ7KUFR6" - archiveName="Nudge-[0-9.]*.pkg" + ;; diff --git a/fragments/labels/nudgesuite.sh b/fragments/labels/nudgesuite.sh index 1a50da1..698cf2e 100644 --- a/fragments/labels/nudgesuite.sh +++ b/fragments/labels/nudgesuite.sh @@ -2,9 +2,9 @@ nudgesuite) name="Nudge Suite" appName="Nudge.app" type="pkg" + archiveName="Nudge_Suite-[0-9.]*.pkg" downloadURL=$(downloadURLFromGit macadmins Nudge ) appNewVersion=$(versionFromGit macadmins Nudge ) expectedTeamID="9GQZ7KUFR6" blockingProcesses=( "Nudge" ) - archiveName="Nudge_Suite-[0-9.]*.pkg" ;; From 5a54cd92b650cd9d4502c7142ffad370190d2830 Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Sat, 17 Sep 2022 14:52:08 +0200 Subject: [PATCH 44/96] Label name changed to "parallelsrasclient" The name of the label has been changed from "rasclient" to "parallelsrasclient" --- fragments/labels/{rasclient.sh => parallelsrasclient sh} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename fragments/labels/{rasclient.sh => parallelsrasclient sh} (97%) diff --git a/fragments/labels/rasclient.sh b/fragments/labels/parallelsrasclient sh similarity index 97% rename from fragments/labels/rasclient.sh rename to fragments/labels/parallelsrasclient sh index 20d10dd..0aa5306 100644 --- a/fragments/labels/rasclient.sh +++ b/fragments/labels/parallelsrasclient sh @@ -1,4 +1,4 @@ -rasclient) +parallelsrasclient) name="Parallels Client" type="pkg" appNewVersion=$(curl -sf "https://download.parallels.com/ras/v18/RAS%20Client%20for%20Mac%20Changelog.txt" | grep -m 1 "Parallels Client for Mac Version" | sed "s|.*Version \(.*\) -.*|\\1|" | sed 's/ /./g' | sed 's/[^0-9.]//g') From b061f37924961e266c0e5fbedd0cc41abdedd600 Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Sat, 17 Sep 2022 14:57:15 +0200 Subject: [PATCH 45/96] Label name changed to "archiwareb2go" The name of the label has been changed from "awb2go" to "archiwareb2go" --- fragments/labels/{awb2go.sh => archiwareb2go.sh} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename fragments/labels/{awb2go.sh => archiwareb2go.sh} (97%) diff --git a/fragments/labels/awb2go.sh b/fragments/labels/archiwareb2go.sh similarity index 97% rename from fragments/labels/awb2go.sh rename to fragments/labels/archiwareb2go.sh index d626313..85f30a8 100644 --- a/fragments/labels/awb2go.sh +++ b/fragments/labels/archiwareb2go.sh @@ -1,4 +1,4 @@ -awb2go) +archiwareb2go) name="P5 Workstation" type="pkgInDmg" packageID="com.archiware.presstore" From 96380b2f274879ac64964605de5fd32d4ee3cf69 Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Sat, 17 Sep 2022 14:59:49 +0200 Subject: [PATCH 46/96] Label name changed to "archiwarepst" The name of the label has been changed from "awpst" to "archiwarepst" --- fragments/labels/{awpst.sh => archiwarepst.sh} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename fragments/labels/{awpst.sh => archiwarepst.sh} (97%) diff --git a/fragments/labels/awpst.sh b/fragments/labels/archiwarepst.sh similarity index 97% rename from fragments/labels/awpst.sh rename to fragments/labels/archiwarepst.sh index 876d176..9ce9b29 100644 --- a/fragments/labels/awpst.sh +++ b/fragments/labels/archiwarepst.sh @@ -1,4 +1,4 @@ -awpst) +archiwarepst) name="P5" type="pkgInDmg" packageID="com.archiware.presstore" From 6c829ed0d672f9a6c52b0f8fe2bd4c4b08a2c278 Mon Sep 17 00:00:00 2001 From: macmangr <106015597+macmangr@users.noreply.github.com> Date: Sat, 17 Sep 2022 16:53:15 +0200 Subject: [PATCH 47/96] Added architecture check and ARM version of Horos The developer has now also released an Apple Silicon version of the software, so a review of the processor and the appropriate download links have been added The expectedTeamID is now a variable because the Apple Silicon version of the app has a different TeamID --- fragments/labels/horos.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fragments/labels/horos.sh b/fragments/labels/horos.sh index 26b8523..96b70b0 100644 --- a/fragments/labels/horos.sh +++ b/fragments/labels/horos.sh @@ -3,6 +3,12 @@ horos) type="dmg" versionKey="CFBundleGetInfoString" appNewVersion=$(curl -fs https://github.com/horosproject/horos/blob/horos/Horos/Info.plist | grep -A 4 "CFBundleGetInfoString" | tail -1 | sed -r 's/.*Horos v([^<]+).*/\1/' | sed 's/ //g') - downloadURL="https://horosproject.org/horos-content/Horos"$appNewVersion".dmg" - expectedTeamID="TPT6TVH8UY" + if [[ $(arch) == "arm64" ]]; then + downloadURL="https://horosproject.org/horos-content/Horos"$appNewVersion"_Apple.dmg" + TeamID="8NDFEW7285" + elif [[ $(arch) == "i386" ]]; then + downloadURL="https://horosproject.org/horos-content/Horos"$appNewVersion".dmg" + TeamID="TPT6TVH8UY" + fi + expectedTeamID=$TeamID ;; From 9c5ab458518a41faaffb8f8ebae186d1b6e4f9ae Mon Sep 17 00:00:00 2001 From: Theile Date: Mon, 19 Sep 2022 11:38:43 +0200 Subject: [PATCH 48/96] Version 9.4 of my MDM scripts --- MDM/-Installomator 1st -DEPNotify.sh | 358 ++++++++++++++++ MDM/-Installomator 1st SS DEPNotify.sh | 358 ++++++++++++++++ MDM/-Installomator 1st SS.sh | 302 +++++++++++++ MDM/-Installomator 1st condition Addigy.sh | 13 + MDM/-Installomator 1st.sh | 305 ++++++++++++++ MDM/-Progress 1st Dialog condition.sh | 13 + MDM/-Progress 1st Dialog.sh | 395 ++++++++++++++++++ MDM/-install Dialog direct condition.sh | 17 + MDM/-install Dialog direct.sh | 148 +++++++ ...-install Installomator direct condition.sh | 14 + MDM/-install Installomator direct.sh | 147 +++++++ MDM/App script.sh | 185 -------- .../Addigy condition notes.sh | 124 ++++++ .../App VFA SS github.sh | 279 +++++++++++++ .../App VFA SS.sh | 227 ++++++++++ .../App browser-security.sh | 211 ++++++++++ .../App normal SS multi-app.sh | 214 ++++++++++ .../App normal SS.sh | 211 ++++++++++ MDM/App-install/App VFA.sh | 93 +++++ .../App browser-security Auto-install.sh | 79 ++++ MDM/App-install/App browser-security SS.sh | 79 ++++ MDM/App-install/App normal Auto-install.sh | 79 ++++ MDM/App-install/App normal SS.sh | 79 ++++ MDM/App-install/App service Auto-install.sh | 208 +++++++++ MDM/App-loop script.sh | 193 --------- MDM/InstallInstallomator.sh | 43 -- MDM/Installomator update.sh | 42 -- MDM/MDMAddigy CustomSoftware.sh | 115 ----- MDM/MDMMosyle install.sh | 79 ---- MDM/Manual valuesfromarguments.sh | 56 --- ...stallomator.sh => Remove Installomator.sh} | 0 31 files changed, 3953 insertions(+), 713 deletions(-) create mode 100755 MDM/-Installomator 1st -DEPNotify.sh create mode 100755 MDM/-Installomator 1st SS DEPNotify.sh create mode 100755 MDM/-Installomator 1st SS.sh create mode 100644 MDM/-Installomator 1st condition Addigy.sh create mode 100755 MDM/-Installomator 1st.sh create mode 100644 MDM/-Progress 1st Dialog condition.sh create mode 100755 MDM/-Progress 1st Dialog.sh create mode 100755 MDM/-install Dialog direct condition.sh create mode 100755 MDM/-install Dialog direct.sh create mode 100755 MDM/-install Installomator direct condition.sh create mode 100755 MDM/-install Installomator direct.sh delete mode 100755 MDM/App script.sh create mode 100644 MDM/App-install with Dialog and dockutil/Addigy condition notes.sh create mode 100755 MDM/App-install with Dialog and dockutil/App VFA SS github.sh create mode 100755 MDM/App-install with Dialog and dockutil/App VFA SS.sh create mode 100755 MDM/App-install with Dialog and dockutil/App browser-security.sh create mode 100644 MDM/App-install with Dialog and dockutil/App normal SS multi-app.sh create mode 100644 MDM/App-install with Dialog and dockutil/App normal SS.sh create mode 100755 MDM/App-install/App VFA.sh create mode 100644 MDM/App-install/App browser-security Auto-install.sh create mode 100644 MDM/App-install/App browser-security SS.sh create mode 100644 MDM/App-install/App normal Auto-install.sh create mode 100644 MDM/App-install/App normal SS.sh create mode 100644 MDM/App-install/App service Auto-install.sh delete mode 100755 MDM/App-loop script.sh delete mode 100644 MDM/InstallInstallomator.sh delete mode 100755 MDM/Installomator update.sh delete mode 100755 MDM/MDMAddigy CustomSoftware.sh delete mode 100644 MDM/MDMMosyle install.sh delete mode 100755 MDM/Manual valuesfromarguments.sh rename MDM/{RemoveInstallomator.sh => Remove Installomator.sh} (100%) diff --git a/MDM/-Installomator 1st -DEPNotify.sh b/MDM/-Installomator 1st -DEPNotify.sh new file mode 100755 index 0000000..9df84a0 --- /dev/null +++ b/MDM/-Installomator 1st -DEPNotify.sh @@ -0,0 +1,358 @@ +#!/bin/sh + +# Installation using Installomator with DEPNotify window +instance="Instance" # Name of used instance + +LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +what=(dialog dockutil microsoftautoupdate supportapp applenyfonts applesfpro applesfmono applesfcompact xink zohoworkdrivetruesync textmate 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) +# Remember: dialog dockutil + +installomatorOptions="NOTIFY=silent BLOCKING_PROCESS_ACTION=ignore INSTALL=force IGNORE_APP_STORE_APPS=yes LOGGING=REQ" + +# DEPNotify display settings, change as desired +title="Installing Apps and other software" +message="Please wait while we download and install the needed software." +endMessage="Installation complete! Please reboot to activate FileVault." +errorMessage="A problem was encountered setting up this Mac. Please contact IT." + +###################################################################### +# Installomator 1st DEPNotify +# +# Installation using Installomator showing progress with DEPNotify +# Great stand-alone solution if installs are only done using Installomator. +# No customization below… +###################################################################### +# This script can be used to install software using Installomator. +# Script will start DEPNotify to display a progress bar. +# Progress bar moves between installations +###################################################################### +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# +# This script made by Søren Theilgaard +# https://github.com/Theile +# Twitter and MacAdmins Slack: @theilgaard +# +# Some functions and code from Installomator: +# https://github.com/Installomator/Installomator +# +###################################################################### +scriptVersion="9.4" +# v. 9.4 : 2022-09-14 : 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.1 : 2022-04-13 : Using INSTALL=force in Label only, so Microsoft labels will not start updating +# v. 9.0.1 : 2022-02-21 : LOGO=addigy, few more "true" lines, and errorOutput on error +# v. 9.0.0 : 2022-02-14 : Updated for Inst. 9.0, Logging improved with printlog +###################################################################### + +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# Check before running +case $LOGO in + addigy|microsoft) + conditionFile="/var/db/.Installomator1stDone" + # Addigy and Microsoft Endpoint Manager (Intune) need a check for a touched file + if [ -e "$conditionFile" ]; then + echo "$LOGO setup detected" + echo "$conditionFile exists, so we exit." + exit 0 + else + echo "$conditionFile not found, so we continue…" + fi + ;; +esac + +# Mark: Constants, logging and caffeinate +log_message="$instance: Installomator 1st with DEPNotify, v$scriptVersion" +label="1st-v$scriptVersion" + +log_location="/private/var/log/Installomator.log" +printlog(){ + timestamp=$(date +%F\ %T) + if [[ "$(whoami)" == "root" ]]; then + echo "$timestamp :: $label : $1" | tee -a $log_location + else + echo "$timestamp :: $label : $1" + fi +} +printlog "[LOG-BEGIN] ${log_message}" + +# Internet check +if [[ "$(nc -z -v -G 10 1.1.1.1 53 2>&1 | grep -io "succeeded")" != "succeeded" ]]; then + printlog "ERROR. No internet connection, we cannot continue." + exit 90 +fi + +# No sleeping +/usr/bin/caffeinate -d -i -m -u & +caffeinatepid=$! +caffexit () { + kill "$caffeinatepid" || true + pkill caffeinate || true + printlog "[LOG-END] Status $1" + exit $1 +} + +# Command-file to DEPNotify +DEPNOTIFY_LOG="/var/tmp/depnotify.log" + +# Counters +errorCount=0 +countLabels=${#what[@]} +printlog "Total installations: $countLabels" + +# Using LOGO variable to specify MDM and shown logo +case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; +esac +if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi +fi +printlog "LOGO: $LOGO - LOGO_PATH: $LOGO_PATH" + +# Mark: Functions +printlog "depnotify_command function" +echo "" > $DEPNOTIFY_LOG || true +function depnotify_command(){ + printlog "DEPNotify-command: $1" + echo "$1" >> $DEPNOTIFY_LOG || true +} + +printlog "startDEPNotify function" +function startDEPNotify() { + currentUser="$(stat -f "%Su" /dev/console)" + currentUserID=$(id -u "$currentUser") + launchctl asuser $currentUserID open -a "/Applications/Utilities/DEPNotify.app/Contents/MacOS/DEPNotify" --args -path "$DEPNOTIFY_LOG" || true # --args -fullScreen + sleep 5 + depnotify_command "Command: KillCommandFile:" + depnotify_command "Command: MainTitle: $title" + depnotify_command "Command: Image: $LOGO_PATH" + depnotify_command "Command: MainText: $message" + depnotify_command "Command: Determinate: $countLabels" +} + +# Notify the user using AppleScript +printlog "displayDialog function" +function displayDialog(){ + currentUser="$(stat -f "%Su" /dev/console)" + currentUserID=$(id -u "$currentUser") + if [[ "$currentUser" != "" ]]; then + launchctl asuser $currentUserID sudo -u $currentUser osascript -e "button returned of (display dialog \"$message\" buttons {\"OK\"} default button \"OK\" with icon POSIX file \"$LOGO_PATH\")" || true + fi +} + +# Mark: Code +name="Installomator" +printlog "$name check for installation" +# download URL, version and Expected Team ID +# Method for GitHub pkg +gitusername="Installomator" +gitreponame="Installomator" +#printlog "$gitusername $gitreponame" +filetype="pkg" +downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") +fi +#printlog "$downloadURL" +appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') +#printlog "$appNewVersion" +expectedTeamID="JME5BW3F3R" + +destFile="/usr/local/Installomator/Installomator.sh" +currentInstalledVersion="$(${destFile} version 2>/dev/null || true)" +printlog "${destFile} version: $currentInstalledVersion" +if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then + printlog "$name not found or version not latest." + printlog "${destFile}" + printlog "Installing version ${appNewVersion} ..." + # Create temporary working directory + tmpDir="$(mktemp -d || true)" + printlog "Created working directory '$tmpDir'" + # Download the installer package + printlog "Downloading $name package version $appNewVersion from: $downloadURL" + installationCount=0 + exitCode=9 + while [[ $installationCount -lt 3 && $exitCode -gt 0 ]]; do + curlDownload=$(curl -Ls "$downloadURL" -o "$tmpDir/$name.pkg" || true) + curlDownloadStatus=$(echo $?) + if [[ $curlDownloadStatus -ne 0 ]]; then + printlog "error downloading $downloadURL, with status $curlDownloadStatus" + printlog "${curlDownload}" + exitCode=1 + else + printlog "Download $name succes." + # Verify the download + teamID=$(spctl -a -vv -t install "$tmpDir/$name.pkg" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' || true) + printlog "Team ID for downloaded package: $teamID" + # Install the package if Team ID validates + if [ "$expectedTeamID" = "$teamID" ] || [ "$expectedTeamID" = "" ]; then + printlog "$name package verified. Installing package '$tmpDir/$name.pkg'." + pkgInstall=$(installer -verbose -dumplog -pkg "$tmpDir/$name.pkg" -target "/" 2>&1) + pkgInstallStatus=$(echo $?) + if [[ $pkgInstallStatus -ne 0 ]]; then + printlog "ERROR. $name package installation failed." + printlog "${pkgInstall}" + exitCode=2 + else + printlog "Installing $name package succes." + exitCode=0 + fi + else + printlog "ERROR. Package verification failed for $name before package installation could start. Download link may be invalid." + exitCode=3 + fi + fi + ((installationCount++)) + printlog "$installationCount time(s), exitCode $exitCode" + if [[ $installationCount -lt 3 ]]; then + if [[ $exitCode -gt 0 ]]; then + printlog "Sleep a bit before trying download and install again. $installationCount time(s)." + printlog "Remove $(rm -fv "$tmpDir/$name.pkg" || true)" + sleep 2 + fi + else + printlog "Download and install of $name succes." + fi + done + # Remove the temporary working directory + printlog "Deleting working directory '$tmpDir' and its contents." + printlog "Remove $(rm -Rfv "${tmpDir}" || true)" + # Handle installation errors + if [[ $exitCode != 0 ]]; then + printlog "ERROR. Installation of $name failed. Aborting." + caffexit $exitCode + else + printlog "$name version $appNewVersion installed!" + fi +else + printlog "$name version $appNewVersion already found. Perfect!" +fi + +# Installing DEPNotify +cmdOutput="$( ${destFile} depnotify LOGO=$LOGO NOTIFY=silent BLOCKING_PROCESS_ACTION=ignore LOGGING=WARN || true )" +exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )" +printlog "DEPNotify install result: $exitStatus" + +itemName="" +errorLabels="" +((countLabels++)) +((countLabels--)) +printlog "$countLabels labels to install" + +startDEPNotify + +for item in "${what[@]}"; do + # Check if DEPNotify is running and try open it if not + if ! pgrep -xq "DEPNotify"; then + startDEPNotify + fi + itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) + if [[ "$itemName" != "#" ]]; then + depnotify_command "Status: $itemName installing…" + else + depnotify_command "Status: $item installing…" + fi + printlog "$item $itemName" + cmdOutput="$( ${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || true )" + #cmdOutput="2022-05-19 13:20:45 : REQ : installomator : ################## End Installomator, exit code 0" + 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 + printlog "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text "WARN" || true )" + printlog "$warnOutput" + else + printlog "Error installing ${item}. Exit code ${exitStatus}" + #printlog "$cmdOutput" + errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + printlog "$errorOutput" + ((errorCount++)) + errorLabels="$errorLabels ${item}" + fi + ((countLabels--)) + itemName="" +done + +# Mark: Finishing +# Prevent re-run of script if conditionFile is set +if [[ ! -z "$conditionFile" ]]; then + printlog "Touching condition file so script will not run again" + touch "$conditionFile" || true + printlog "$(ls -al "$conditionFile" || true)" +fi + +# Show error to user if any +printlog "Errors: $errorCount" +if [[ $errorCount -ne 0 ]]; then + errorMessage="${errorMessage} Total errors: $errorCount" + message="$errorMessage" + displayDialog & + endMessage="$message" + printlog "errorLabels: $errorLabels" +fi + +depnotify_command "Command: MainText: $endMessage" +depnotify_command "Command: Quit: $endMessage" + +sleep 1 +printlog "Remove $(rm -fv $DEPNOTIFY_LOG || true)" + +printlog "Ending" +caffexit $errorCount diff --git a/MDM/-Installomator 1st SS DEPNotify.sh b/MDM/-Installomator 1st SS DEPNotify.sh new file mode 100755 index 0000000..b960734 --- /dev/null +++ b/MDM/-Installomator 1st SS DEPNotify.sh @@ -0,0 +1,358 @@ +#!/bin/sh + +# Installation using Installomator with DEPNotify window +instance="Instance" # Name of used instance + +LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +what=(dialog dockutil microsoftautoupdate supportapp applenyfonts applesfpro applesfmono applesfcompact xink zohoworkdrivetruesync textmate 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) +# Remember: dialog dockutil + +installomatorOptions="NOTIFY=all BLOCKING_PROCESS_ACTION=prompt_user" + +# DEPNotify display settings, change as desired +title="Installing Apps and other software" +message="Please wait while we download and install the needed software." +endMessage="Installation complete! Please reboot to activate FileVault." +errorMessage="A problem was encountered setting up this Mac. Please contact IT." + +###################################################################### +# Installomator 1st DEPNotify +# +# Installation using Installomator showing progress with DEPNotify +# Great stand-alone solution if installs are only done using Installomator. +# No customization below… +###################################################################### +# This script can be used to install software using Installomator. +# Script will start DEPNotify to display a progress bar. +# Progress bar moves between installations +###################################################################### +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# +# This script made by Søren Theilgaard +# https://github.com/Theile +# Twitter and MacAdmins Slack: @theilgaard +# +# Some functions and code from Installomator: +# https://github.com/Installomator/Installomator +# +###################################################################### +scriptVersion="9.4" +# v. 9.4 : 2022-09-14 : 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.1 : 2022-04-13 : Using INSTALL=force in Label only, so Microsoft labels will not start updating +# v. 9.0.1 : 2022-02-21 : LOGO=addigy, few more "true" lines, and errorOutput on error +# v. 9.0.0 : 2022-02-14 : Updated for Inst. 9.0, Logging improved with printlog +###################################################################### + +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# Check before running +case $LOGO in + addigy|microsoft) + conditionFile="/var/db/.Installomator1stDone" + # Addigy and Microsoft Endpoint Manager (Intune) need a check for a touched file + if [ -e "$conditionFile" ]; then + echo "$LOGO setup detected" + echo "$conditionFile exists, so we exit." + exit 0 + else + echo "$conditionFile not found, so we continue…" + fi + ;; +esac + +# Mark: Constants, logging and caffeinate +log_message="$instance: Installomator 1st with DEPNotify, v$scriptVersion" +label="1st-v$scriptVersion" + +log_location="/private/var/log/Installomator.log" +printlog(){ + timestamp=$(date +%F\ %T) + if [[ "$(whoami)" == "root" ]]; then + echo "$timestamp :: $label : $1" | tee -a $log_location + else + echo "$timestamp :: $label : $1" + fi +} +printlog "[LOG-BEGIN] ${log_message}" + +# Internet check +if [[ "$(nc -z -v -G 10 1.1.1.1 53 2>&1 | grep -io "succeeded")" != "succeeded" ]]; then + printlog "ERROR. No internet connection, we cannot continue." + exit 90 +fi + +# No sleeping +/usr/bin/caffeinate -d -i -m -u & +caffeinatepid=$! +caffexit () { + kill "$caffeinatepid" || true + pkill caffeinate || true + printlog "[LOG-END] Status $1" + exit $1 +} + +# Command-file to DEPNotify +DEPNOTIFY_LOG="/var/tmp/depnotify.log" + +# Counters +errorCount=0 +countLabels=${#what[@]} +printlog "Total installations: $countLabels" + +# Using LOGO variable to specify MDM and shown logo +case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; +esac +if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi +fi +printlog "LOGO: $LOGO - LOGO_PATH: $LOGO_PATH" + +# Mark: Functions +printlog "depnotify_command function" +echo "" > $DEPNOTIFY_LOG || true +function depnotify_command(){ + printlog "DEPNotify-command: $1" + echo "$1" >> $DEPNOTIFY_LOG || true +} + +printlog "startDEPNotify function" +function startDEPNotify() { + currentUser="$(stat -f "%Su" /dev/console)" + currentUserID=$(id -u "$currentUser") + launchctl asuser $currentUserID open -a "/Applications/Utilities/DEPNotify.app/Contents/MacOS/DEPNotify" --args -path "$DEPNOTIFY_LOG" || true # --args -fullScreen + sleep 5 + depnotify_command "Command: KillCommandFile:" + depnotify_command "Command: MainTitle: $title" + depnotify_command "Command: Image: $LOGO_PATH" + depnotify_command "Command: MainText: $message" + depnotify_command "Command: Determinate: $countLabels" +} + +# Notify the user using AppleScript +printlog "displayDialog function" +function displayDialog(){ + currentUser="$(stat -f "%Su" /dev/console)" + currentUserID=$(id -u "$currentUser") + if [[ "$currentUser" != "" ]]; then + launchctl asuser $currentUserID sudo -u $currentUser osascript -e "button returned of (display dialog \"$message\" buttons {\"OK\"} default button \"OK\" with icon POSIX file \"$LOGO_PATH\")" || true + fi +} + +# Mark: Code +name="Installomator" +printlog "$name check for installation" +# download URL, version and Expected Team ID +# Method for GitHub pkg +gitusername="Installomator" +gitreponame="Installomator" +#printlog "$gitusername $gitreponame" +filetype="pkg" +downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") +fi +#printlog "$downloadURL" +appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') +#printlog "$appNewVersion" +expectedTeamID="JME5BW3F3R" + +destFile="/usr/local/Installomator/Installomator.sh" +currentInstalledVersion="$(${destFile} version 2>/dev/null || true)" +printlog "${destFile} version: $currentInstalledVersion" +if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then + printlog "$name not found or version not latest." + printlog "${destFile}" + printlog "Installing version ${appNewVersion} ..." + # Create temporary working directory + tmpDir="$(mktemp -d || true)" + printlog "Created working directory '$tmpDir'" + # Download the installer package + printlog "Downloading $name package version $appNewVersion from: $downloadURL" + installationCount=0 + exitCode=9 + while [[ $installationCount -lt 3 && $exitCode -gt 0 ]]; do + curlDownload=$(curl -Ls "$downloadURL" -o "$tmpDir/$name.pkg" || true) + curlDownloadStatus=$(echo $?) + if [[ $curlDownloadStatus -ne 0 ]]; then + printlog "error downloading $downloadURL, with status $curlDownloadStatus" + printlog "${curlDownload}" + exitCode=1 + else + printlog "Download $name succes." + # Verify the download + teamID=$(spctl -a -vv -t install "$tmpDir/$name.pkg" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' || true) + printlog "Team ID for downloaded package: $teamID" + # Install the package if Team ID validates + if [ "$expectedTeamID" = "$teamID" ] || [ "$expectedTeamID" = "" ]; then + printlog "$name package verified. Installing package '$tmpDir/$name.pkg'." + pkgInstall=$(installer -verbose -dumplog -pkg "$tmpDir/$name.pkg" -target "/" 2>&1) + pkgInstallStatus=$(echo $?) + if [[ $pkgInstallStatus -ne 0 ]]; then + printlog "ERROR. $name package installation failed." + printlog "${pkgInstall}" + exitCode=2 + else + printlog "Installing $name package succes." + exitCode=0 + fi + else + printlog "ERROR. Package verification failed for $name before package installation could start. Download link may be invalid." + exitCode=3 + fi + fi + ((installationCount++)) + printlog "$installationCount time(s), exitCode $exitCode" + if [[ $installationCount -lt 3 ]]; then + if [[ $exitCode -gt 0 ]]; then + printlog "Sleep a bit before trying download and install again. $installationCount time(s)." + printlog "Remove $(rm -fv "$tmpDir/$name.pkg" || true)" + sleep 2 + fi + else + printlog "Download and install of $name succes." + fi + done + # Remove the temporary working directory + printlog "Deleting working directory '$tmpDir' and its contents." + printlog "Remove $(rm -Rfv "${tmpDir}" || true)" + # Handle installation errors + if [[ $exitCode != 0 ]]; then + printlog "ERROR. Installation of $name failed. Aborting." + caffexit $exitCode + else + printlog "$name version $appNewVersion installed!" + fi +else + printlog "$name version $appNewVersion already found. Perfect!" +fi + +# Installing DEPNotify +cmdOutput="$( ${destFile} depnotify LOGO=$LOGO NOTIFY=silent BLOCKING_PROCESS_ACTION=ignore LOGGING=WARN || true )" +exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )" +printlog "DEPNotify install result: $exitStatus" + +itemName="" +errorLabels="" +((countLabels++)) +((countLabels--)) +printlog "$countLabels labels to install" + +startDEPNotify + +for item in "${what[@]}"; do + # Check if DEPNotify is running and try open it if not + if ! pgrep -xq "DEPNotify"; then + startDEPNotify + fi + itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) + if [[ "$itemName" != "#" ]]; then + depnotify_command "Status: $itemName installing…" + else + depnotify_command "Status: $item installing…" + fi + printlog "$item $itemName" + cmdOutput="$( ${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || true )" + #cmdOutput="2022-05-19 13:20:45 : REQ : installomator : ################## End Installomator, exit code 0" + 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 + printlog "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text "WARN" || true )" + printlog "$warnOutput" + else + printlog "Error installing ${item}. Exit code ${exitStatus}" + #printlog "$cmdOutput" + errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + printlog "$errorOutput" + ((errorCount++)) + errorLabels="$errorLabels ${item}" + fi + ((countLabels--)) + itemName="" +done + +# Mark: Finishing +# Prevent re-run of script if conditionFile is set +if [[ ! -z "$conditionFile" ]]; then + printlog "Touching condition file so script will not run again" + touch "$conditionFile" || true + printlog "$(ls -al "$conditionFile" || true)" +fi + +# Show error to user if any +printlog "Errors: $errorCount" +if [[ $errorCount -ne 0 ]]; then + errorMessage="${errorMessage} Total errors: $errorCount" + message="$errorMessage" + displayDialog & + endMessage="$message" + printlog "errorLabels: $errorLabels" +fi + +depnotify_command "Command: MainText: $endMessage" +depnotify_command "Command: Quit: $endMessage" + +sleep 1 +printlog "Remove $(rm -fv $DEPNOTIFY_LOG || true)" + +printlog "Ending" +caffexit $errorCount diff --git a/MDM/-Installomator 1st SS.sh b/MDM/-Installomator 1st SS.sh new file mode 100755 index 0000000..9efa824 --- /dev/null +++ b/MDM/-Installomator 1st SS.sh @@ -0,0 +1,302 @@ +#!/bin/sh + +# Installation using Installomator +instance="Instance" # Name of used instance + +LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +what=(dialog dockutil microsoftautoupdate supportapp applenyfonts applesfpro applesfmono applesfcompact xink zohoworkdrivetruesync textmate 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) +# Remember: dialog dockutil + +installomatorOptions="NOTIFY=all BLOCKING_PROCESS_ACTION=prompt_user" + +# Error message to user if any occur +errorMessage="A problem was encountered setting up this Mac. Please contact IT." + +###################################################################### +# Installomator 1st for Self Service +# +# Installation using Installomator +# No customization below… +###################################################################### +# This script can be used to install software using Installomator, where the user activate it in Self Service. +# Script will display a dialog if any errors happens. +# Progress is shown in notifications to the user +###################################################################### +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# +# This script made by Søren Theilgaard +# https://github.com/Theile +# Twitter and MacAdmins Slack: @theilgaard +# +# Some functions and code from Installomator: +# https://github.com/Installomator/Installomator +# +###################################################################### +scriptVersion="9.4" +# v. 9.4 : 2022-09-14 : 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. +###################################################################### + +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# Check before running +case $LOGO in + addigy|microsoft) + conditionFile="/var/db/.Installomator1stDone" + # Addigy and Microsoft Endpoint Manager (Intune) need a check for a touched file + if [ -e "$conditionFile" ]; then + echo "$LOGO setup detected" + echo "$conditionFile exists, so we exit." + exit 0 + else + echo "$conditionFile not found, so we continue…" + fi + ;; +esac + +# Mark: Constants, logging and caffeinate +log_message="$instance: Installomator 1st, v$scriptVersion" +label="1st-v$scriptVersion" + +log_location="/private/var/log/Installomator.log" +printlog(){ + timestamp=$(date +%F\ %T) + if [[ "$(whoami)" == "root" ]]; then + echo "$timestamp :: $label : $1" | tee -a $log_location + else + echo "$timestamp :: $label : $1" + fi +} +printlog "[LOG-BEGIN] ${log_message}" + +# Internet check +if [[ "$(nc -z -v -G 10 1.1.1.1 53 2>&1 | grep -io "succeeded")" != "succeeded" ]]; then + printlog "ERROR. No internet connection, we cannot continue." + caffexit 90 +fi + +# No sleeping +/usr/bin/caffeinate -d -i -m -u & +caffeinatepid=$! +caffexit () { + kill "$caffeinatepid" || true + pkill caffeinate || true + printlog "[LOG-END] Status $1" + exit $1 +} + +# Counters +errorCount=0 +countLabels=${#what[@]} +printlog "Total installations: $countLabels" + +# Using LOGO variable to specify MDM and shown logo +case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; +esac +if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi +fi +printlog "LOGO: $LOGO – LOGO_PATH: $LOGO_PATH" + +# Mark: Functions +# Notify the user using AppleScript +function displayDialog(){ + currentUser="$(stat -f "%Su" /dev/console)" + currentUserID=$(id -u "$currentUser") + if [[ "$currentUser" != "" ]]; then + launchctl asuser $currentUserID sudo -u $currentUser osascript -e "button returned of (display dialog \"$message\" buttons {\"OK\"} default button \"OK\" with icon POSIX file \"$LOGO_PATH\")" || true + fi +} + +# Mark: Code +name="Installomator" +printlog "$name check for installation" +# download URL, version and Expected Team ID +# Method for GitHub pkg +gitusername="Installomator" +gitreponame="Installomator" +#printlog "$gitusername $gitreponame" +filetype="pkg" +downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") +fi +#printlog "$downloadURL" +appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') +#printlog "$appNewVersion" +expectedTeamID="JME5BW3F3R" + +destFile="/usr/local/Installomator/Installomator.sh" +currentInstalledVersion="$(${destFile} version 2>/dev/null || true)" +printlog "${destFile} version: $currentInstalledVersion" +if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then + printlog "$name not found or version not latest." + printlog "${destFile}" + printlog "Installing version ${appNewVersion} ..." + # Create temporary working directory + tmpDir="$(mktemp -d || true)" + printlog "Created working directory '$tmpDir'" + # Download the installer package + printlog "Downloading $name package version $appNewVersion from: $downloadURL" + installationCount=0 + exitCode=9 + while [[ $installationCount -lt 3 && $exitCode -gt 0 ]]; do + curlDownload=$(curl -Ls "$downloadURL" -o "$tmpDir/$name.pkg" || true) + curlDownloadStatus=$(echo $?) + if [[ $curlDownloadStatus -ne 0 ]]; then + printlog "error downloading $downloadURL, with status $curlDownloadStatus" + printlog "${curlDownload}" + exitCode=1 + else + printlog "Download $name succes." + # Verify the download + teamID=$(spctl -a -vv -t install "$tmpDir/$name.pkg" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' || true) + printlog "Team ID for downloaded package: $teamID" + # Install the package if Team ID validates + if [ "$expectedTeamID" = "$teamID" ] || [ "$expectedTeamID" = "" ]; then + printlog "$name package verified. Installing package '$tmpDir/$name.pkg'." + pkgInstall=$(installer -verbose -dumplog -pkg "$tmpDir/$name.pkg" -target "/" 2>&1) + pkgInstallStatus=$(echo $?) + if [[ $pkgInstallStatus -ne 0 ]]; then + printlog "ERROR. $name package installation failed." + printlog "${pkgInstall}" + exitCode=2 + else + printlog "Installing $name package succes." + exitCode=0 + fi + else + printlog "ERROR. Package verification failed for $name before package installation could start. Download link may be invalid." + exitCode=3 + fi + fi + ((installationCount++)) + printlog "$installationCount time(s), exitCode $exitCode" + if [[ $installationCount -lt 3 ]]; then + if [[ $exitCode -gt 0 ]]; then + printlog "Sleep a bit before trying download and install again. $installationCount time(s)." + printlog "Remove $(rm -fv "$tmpDir/$name.pkg" || true)" + sleep 2 + fi + else + printlog "Download and install of $name succes." + fi + done + # Remove the temporary working directory + printlog "Deleting working directory '$tmpDir' and its contents." + printlog "Remove $(rm -Rfv "${tmpDir}" || true)" + # Handle installation errors + if [[ $exitCode != 0 ]]; then + printlog "ERROR. Installation of $name failed. Aborting." + caffexit $exitCode + else + printlog "$name version $appNewVersion installed!" + fi +else + printlog "$name version $appNewVersion already found. Perfect!" +fi + +errorLabels="" +((countLabels++)) +((countLabels--)) +printlog "$countLabels labels to install" + +for item in "${what[@]}"; do + printlog "$item" + cmdOutput="$( ${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || true )" + 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 + printlog "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text "WARN" || true )" + printlog "$warnOutput" + else + printlog "Error installing ${item}. Exit code ${exitStatus}" + #printlog "$cmdOutput" + errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + printlog "$errorOutput" + ((errorCount++)) + errorLabels="$errorLabels ${item}" + fi + ((countLabels--)) + itemName="" +done + +# Mark: Finishing +# Prevent re-run of script if conditionFile is set +if [[ ! -z "$conditionFile" ]]; then + printlog "Touching condition file so script will not run again" + touch "$conditionFile" || true + printlog "$(ls -al "$conditionFile" || true)" +fi + +# Show error to user if any +printlog "Errors: $errorCount" +if [[ $errorCount -ne 0 ]]; then + printlog "ERROR: Display error dialog to user!" + errorMessage="${errorMessage} Total errors: $errorCount" + message="$errorMessage" + displayDialog & + printlog "errorLabels: $errorLabels" +fi + +printlog "Ending" +caffexit $errorCount diff --git a/MDM/-Installomator 1st condition Addigy.sh b/MDM/-Installomator 1st condition Addigy.sh new file mode 100644 index 0000000..95b9806 --- /dev/null +++ b/MDM/-Installomator 1st condition Addigy.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Mark: Addigy Condition on condition file +# Install on success + +conditionFile="/var/db/.Installomator1stDone" +if [ -e "$conditionFile" ]; then + echo "$conditionFile exists. Exiting." + exit 1 +else + echo "$conditionFile not found. Continue…" + exit 0 +fi diff --git a/MDM/-Installomator 1st.sh b/MDM/-Installomator 1st.sh new file mode 100755 index 0000000..744f5c3 --- /dev/null +++ b/MDM/-Installomator 1st.sh @@ -0,0 +1,305 @@ +#!/bin/sh + +# Installation using Installomator +instance="Instance" # Name of used instance + +LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +what=(dialog dockutil microsoftautoupdate supportapp xink zohoworkdrivetruesync textmate applenyfonts applesfpro applesfmono applesfcompact 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) +# Remember: dialog dockutil + +installomatorOptions="NOTIFY=silent BLOCKING_PROCESS_ACTION=ignore INSTALL=force IGNORE_APP_STORE_APPS=yes LOGGING=REQ" + +# 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." + +###################################################################### +# Installomator 1st +# +# Installation using Installomator (use separate Installation1stProgress script to show progress) +# No customization below… +###################################################################### +# This script can be used to install software using Installomator. +# Script will display a dialog if any errors happens. +# User is not notified about installations. +###################################################################### +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# +# This script made by Søren Theilgaard +# https://github.com/Theile +# Twitter and MacAdmins Slack: @theilgaard +# +# Some functions and code from Installomator: +# https://github.com/Installomator/Installomator +# +###################################################################### +scriptVersion="9.4" +# 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 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 + +# Check before running +case $LOGO in + addigy|microsoft) + conditionFile="/var/db/.Installomator1stDone" + # Addigy and Microsoft Endpoint Manager (Intune) need a check for a touched file + if [ -e "$conditionFile" ]; then + echo "$LOGO setup detected" + echo "$conditionFile exists, so we exit." + exit 0 + else + echo "$conditionFile not found, so we continue…" + fi + ;; +esac + +# Mark: Constants, logging and caffeinate +log_message="$instance: Installomator 1st, v$scriptVersion" +label="1st-v$scriptVersion" + +log_location="/private/var/log/Installomator.log" +printlog(){ + timestamp=$(date +%F\ %T) + if [[ "$(whoami)" == "root" ]]; then + echo "$timestamp :: $label : $1" | tee -a $log_location + else + echo "$timestamp :: $label : $1" + fi +} +printlog "[LOG-BEGIN] ${log_message}" + +# Internet check +if [[ "$(nc -z -v -G 10 1.1.1.1 53 2>&1 | grep -io "succeeded")" != "succeeded" ]]; then + printlog "ERROR. No internet connection, we cannot continue." + caffexit 90 +fi + +# No sleeping +/usr/bin/caffeinate -d -i -m -u & +caffeinatepid=$! +caffexit () { + kill "$caffeinatepid" || true + pkill caffeinate || true + printlog "[LOG-END] Status $1" + exit $1 +} + +# Counters +errorCount=0 +countLabels=${#what[@]} +printlog "Total installations: $countLabels" + +# Using LOGO variable to specify MDM and shown logo +case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; +esac +if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi +fi +printlog "LOGO: $LOGO – LOGO_PATH: $LOGO_PATH" + +# Mark: Functions +# Notify the user using AppleScript +function displayDialog(){ + currentUser="$(stat -f "%Su" /dev/console)" + currentUserID=$(id -u "$currentUser") + if [[ "$currentUser" != "" ]]; then + launchctl asuser $currentUserID sudo -u $currentUser osascript -e "button returned of (display dialog \"$message\" buttons {\"OK\"} default button \"OK\" with icon POSIX file \"$LOGO_PATH\")" || true + fi +} + +# Mark: Code +name="Installomator" +printlog "$name check for installation" +# download URL, version and Expected Team ID +# Method for GitHub pkg +gitusername="Installomator" +gitreponame="Installomator" +#printlog "$gitusername $gitreponame" +filetype="pkg" +downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") +fi +#printlog "$downloadURL" +appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') +#printlog "$appNewVersion" +expectedTeamID="JME5BW3F3R" + +destFile="/usr/local/Installomator/Installomator.sh" +currentInstalledVersion="$(${destFile} version 2>/dev/null || true)" +printlog "${destFile} version: $currentInstalledVersion" +if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then + printlog "$name not found or version not latest." + printlog "${destFile}" + printlog "Installing version ${appNewVersion} ..." + # Create temporary working directory + tmpDir="$(mktemp -d || true)" + printlog "Created working directory '$tmpDir'" + # Download the installer package + printlog "Downloading $name package version $appNewVersion from: $downloadURL" + installationCount=0 + exitCode=9 + while [[ $installationCount -lt 3 && $exitCode -gt 0 ]]; do + curlDownload=$(curl -Ls "$downloadURL" -o "$tmpDir/$name.pkg" || true) + curlDownloadStatus=$(echo $?) + if [[ $curlDownloadStatus -ne 0 ]]; then + printlog "error downloading $downloadURL, with status $curlDownloadStatus" + printlog "${curlDownload}" + exitCode=1 + else + printlog "Download $name succes." + # Verify the download + teamID=$(spctl -a -vv -t install "$tmpDir/$name.pkg" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' || true) + printlog "Team ID for downloaded package: $teamID" + # Install the package if Team ID validates + if [ "$expectedTeamID" = "$teamID" ] || [ "$expectedTeamID" = "" ]; then + printlog "$name package verified. Installing package '$tmpDir/$name.pkg'." + pkgInstall=$(installer -verbose -dumplog -pkg "$tmpDir/$name.pkg" -target "/" 2>&1) + pkgInstallStatus=$(echo $?) + if [[ $pkgInstallStatus -ne 0 ]]; then + printlog "ERROR. $name package installation failed." + printlog "${pkgInstall}" + exitCode=2 + else + printlog "Installing $name package succes." + exitCode=0 + fi + else + printlog "ERROR. Package verification failed for $name before package installation could start. Download link may be invalid." + exitCode=3 + fi + fi + ((installationCount++)) + printlog "$installationCount time(s), exitCode $exitCode" + if [[ $installationCount -lt 3 ]]; then + if [[ $exitCode -gt 0 ]]; then + printlog "Sleep a bit before trying download and install again. $installationCount time(s)." + printlog "Remove $(rm -fv "$tmpDir/$name.pkg" || true)" + sleep 2 + fi + else + printlog "Download and install of $name succes." + fi + done + # Remove the temporary working directory + printlog "Deleting working directory '$tmpDir' and its contents." + printlog "Remove $(rm -Rfv "${tmpDir}" || true)" + # Handle installation errors + if [[ $exitCode != 0 ]]; then + printlog "ERROR. Installation of $name failed. Aborting." + caffexit $exitCode + else + printlog "$name version $appNewVersion installed!" + fi +else + printlog "$name version $appNewVersion already found. Perfect!" +fi + +errorLabels="" +((countLabels++)) +((countLabels--)) +printlog "$countLabels labels to install" + +for item in "${what[@]}"; do + printlog "$item" + cmdOutput="$( ${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || true )" + 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 + printlog "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text "WARN" || true )" + printlog "$warnOutput" + else + printlog "Error installing ${item}. Exit code ${exitStatus}" + #printlog "$cmdOutput" + errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + printlog "$errorOutput" + ((errorCount++)) + errorLabels="$errorLabels ${item}" + fi + ((countLabels--)) + itemName="" +done + +# Mark: Finishing +# Prevent re-run of script if conditionFile is set +if [[ ! -z "$conditionFile" ]]; then + printlog "Touching condition file so script will not run again" + touch "$conditionFile" || true + printlog "$(ls -al "$conditionFile" || true)" +fi + +# Show error to user if any +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 + +printlog "Ending" +caffexit $errorCount diff --git a/MDM/-Progress 1st Dialog condition.sh b/MDM/-Progress 1st Dialog condition.sh new file mode 100644 index 0000000..6f91d6d --- /dev/null +++ b/MDM/-Progress 1st Dialog condition.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Mark: Addigy Condition on condition file +# Install on success + +conditionFile="/var/db/.Installation1stProgressDone" +if [ -e "$conditionFile" ]; then + echo "$conditionFile exists. Exiting." + exit 1 +else + echo "$conditionFile not found. Continue…" + exit 0 +fi diff --git a/MDM/-Progress 1st Dialog.sh b/MDM/-Progress 1st Dialog.sh new file mode 100755 index 0000000..dfb9980 --- /dev/null +++ b/MDM/-Progress 1st Dialog.sh @@ -0,0 +1,395 @@ +#!/bin/sh + +# Progress 1st with swiftDialog +instance="Instance" # Name of used instance + +LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +apps=( + "swiftDialog,/usr/local/bin/dialog" + "dockutil,/usr/local/bin/dockutil" + "desktoppr,/usr/local/bin/desktoppr" + "SupportApp,/Applications/Support.app" + "Xink,/Applications/Xink.app" + "Apple NewYork Font,/Library/Fonts/NewYork.ttf" + "Apple SF Pro Font,/Library/Fonts/SF-Pro.ttf" + "Apple SF Mono Font,/Library/Fonts/SF-Mono-Bold.otf" + "Apple SF Compact Font,/Library/Fonts/SF-Compact.ttf" + "Zoho WorkDrive TrueSync,/Applications/Zoho WorkDrive TrueSync.app" + "TextMate,/Applications/TextMate.app" + "Sublime Text,/Applications/Sublime Text.app" + "1Password,/Applications/1Password 7.app" + "Mactracker,/Applications/Mactracker.app" + "WWDC,/Applications/WWDC.app" + "The Unarchiver,/Applications/The Unarchiver.app" + "Keka,/Applications/Keka.app" + "Brave,/Applications/Brave Browser.app" + "Firefox,/Applications/Firefox.app" + "Microsoft AutoUpdate,/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app" + "Microsoft Edge,/Applications/Microsoft Edge.app" + "Microsoft Teams,/Applications/Microsoft Teams.app" + "Microsoft Excel,/Applications/Microsoft Excel.app" + "Microsoft OneNote,/Applications/Microsoft OneNote.app" + "Microsoft Outlook,/Applications/Microsoft Outlook.app" + "Microsoft PowerPoint,/Applications/Microsoft PowerPoint.app" + "Microsoft Word,/Applications/Microsoft Word.app" + "Microsoft OneDrive,/Applications/OneDrive.app" +) + +# Dialog display settings, change as desired +title="Installing Apps and other software" +message="Please wait while we download and install the needed software." +endMessage="Installation complete! Please reboot to activate FileVault." +displayEndMessageDialog=1 # Should endMessage be shown as a dialog? (0|1) +errorMessage="A problem was encountered setting up this Mac. Please contact IT." + +###################################################################### +# Progress 1st Dialog +# +# Showing installation progress using swiftDialog +# No customization below… +###################################################################### +# Complete script meant for running via MDM on device enrollment. This will download +# and install Dialog on the fly before opening Dialog. +# +# Log: /private/var/log/InstallationProgress.log +# This file prevents script from running again on Addigy and Microsoft Endpoint (Intune): +# "/var/db/.Installation1stProgress" +# +# Display a Dialog with a list of applications and indicate when they’ve been installed +# Useful when apps are deployed at random, perhaps without local logging. +# Applies to Mosyle App Catalog installs, VPP app installs, Installomator installs etc. +# The script watches the existence of files in the file system, so that is used to show progress. +# +# Requires Dialog v1.9.1 or later (will be installed) https://github.com/bartreardon/swiftDialog +# +###################################################################### +# +# This script made by Søren Theilgaard +# https://github.com/Theile +# Twitter and MacAdmins Slack: @theilgaard +# +# Based on the work by Adam Codega: +# https://github.com/acodega/dialog-scripts +# +# Some functions and code from Installomator: +# https://github.com/Installomator/Installomator +# +###################################################################### +# List of apps/installs to process in “apps” array. +# Provide the display name as you prefer and the path to the app/file. ex: +# "Google Chrome,/Applications/Google Chrome.app" +# A comma separates the display name from the path. Do not use commas in your display name text. +# +# Tip: Check for something like print drivers using the pkg receipt, like: +# "Konica-Minolta drivers,/var/db/receipts/jp.konicaminolta.print.package.C759.plist" +# Or fonts, like: +# "Apple SF Pro Font,/Library/Fonts/SF-Pro.ttf" +###################################################################### +scriptVersion="9.4" +# v. 9.4 : 2022-09-14 : downloadURL can fall back on GitHub API +# v. 9.3 : 2022-08-29 : Logging changed for current version. Improved installation with looping if it fails, so it can try again. Improved GitHub handling. +# v. 9.2.2 : 2022-06-17 : Improved Dialog installation. Check 1.1.1.1 for internet connection. +# v. 9.2 : 2022-05-19 : Not using GitHub api for download of Dialog, show a dialog when finished to make message more important. Now universal script for all supported MDMs based on LOGO variable. +# v. 9.0 : 2022-05-16 : Based on acodega’s work, I have added progress bar, changed logging and use another log-location, a bit more error handling for Dialog download, added some "|| true"-endings to some lines to not make them fail in Addigy, and some more. +###################################################################### + +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# Check before running +case $LOGO in + addigy|microsoft) + conditionFile="/var/db/.Installation1stProgressDone" + # Addigy and Microsoft Endpoint Manager (Intune) need a check for a touched file + if [ -e "$conditionFile" ]; then + echo "$LOGO setup detected" + echo "$conditionFile exists, so we exit." + exit 0 + else + echo "$conditionFile not found, so we continue…" + fi + ;; +esac + +# Mark: Constants and logging +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +log_message="$instance: Installation 1st Progress with Dialog, v$scriptVersion" +label="D1st-v$scriptVersion" + +log_location="/private/var/log/Installation1stProgress.log" +function printlog(){ + timestamp=$(date +%F\ %T) + if [[ "$(whoami)" == "root" ]]; then + echo "$timestamp :: $label : $1" | tee -a $log_location + else + echo "$timestamp :: $label : $1" + fi +} +printlog "[LOG-BEGIN] ${log_message}" + +# Internet check +if [[ "$(nc -z -v -G 10 1.1.1.1 53 2>&1 | grep -io "succeeded")" != "succeeded" ]]; then + printlog "ERROR. No internet connection, we cannot continue." + exit 90 +fi + +# Location of dialog and dialog command file +dialogApp="/usr/local/bin/dialog" +dialog_command_file="/var/tmp/dialog.log" +counterFile="/var/tmp/Installation1stProgress.plist" + +# Counters +progress_index=0 +step_progress=0 +defaults write $counterFile step -int 0 +progress_total=${#apps[@]} +printlog "Total watched installations: $progress_total" + +# Using LOGO variable to specify MDM and shown logo +case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; +esac +if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi +fi +printlog "LOGO: $LOGO – LOGO_PATH: $LOGO_PATH" + +# Mark: Functions +# execute a dialog command +echo "" > $dialog_command_file || true +function dialog_command(){ + printlog "Dialog-command: $1" + echo "$1" >> $dialog_command_file || true +} + +function appCheck(){ + dialog_command "listitem: $(echo "$app" | cut -d ',' -f1): wait" + while [ ! -e "$(echo "$app" | cut -d ',' -f2)" ]; do + sleep 2 + done + dialog_command "progresstext: Install of “$(echo "$app" | cut -d ',' -f1)” complete" + dialog_command "listitem: $(echo "$app" | cut -d ',' -f1): ✅" + progress_index=$(defaults read $counterFile step) + progress_index=$(( progress_index + 1 )) + defaults write $counterFile step -int $progress_index + dialog_command "progress: $progress_index" + printlog "at item number $progress_index" +} + +# Notify the user using AppleScript +function displayDialog(){ + if [[ "$currentUser" != "" ]]; then + launchctl asuser $currentUserID sudo -u $currentUser osascript -e "button returned of (display dialog \"$message\" buttons {\"OK\"} default button \"OK\" with icon POSIX file \"$LOGO_PATH\")" || true + fi +} + +# Mark: Code +name="Dialog" +printlog "$name check for installation" +# download URL, version and Expected Team ID +# Method for GitHub pkg w. app version check +gitusername="bartreardon" +gitreponame="swiftDialog" +#printlog "$gitusername $gitreponame" +filetype="pkg" +downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") +fi +#printlog "$downloadURL" +appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') +#printlog "$appNewVersion" +expectedTeamID="PWA5E9TQ59" +destFile="/Library/Application Support/Dialog/Dialog.app" +versionKey="CFBundleShortVersionString" #CFBundleVersion + +currentInstalledVersion="$(defaults read "${destFile}/Contents/Info.plist" $versionKey || true)" +printlog "${name} version: $currentInstalledVersion" +if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then + printlog "$name not found or version not latest." + printlog "${destFile}" + printlog "Installing version ${appNewVersion}…" + # Create temporary working directory + tmpDir="$(mktemp -d || true)" + printlog "Created working directory '$tmpDir'" + # Download the installer package + printlog "Downloading $name package version $appNewVersion from: $downloadURL" + installationCount=0 + exitCode=9 + while [[ $installationCount -lt 3 && $exitCode -gt 0 ]]; do + curlDownload=$(curl -Ls "$downloadURL" -o "$tmpDir/$name.pkg" || true) + curlDownloadStatus=$(echo $?) + if [[ $curlDownloadStatus -ne 0 ]]; then + printlog "error downloading $downloadURL, with status $curlDownloadStatus" + printlog "${curlDownload}" + exitCode=1 + else + printlog "Download $name succes." + # Verify the download + teamID=$(spctl -a -vv -t install "$tmpDir/$name.pkg" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' || true) + printlog "Team ID for downloaded package: $teamID" + # Install the package if Team ID validates + if [ "$expectedTeamID" = "$teamID" ] || [ "$expectedTeamID" = "" ]; then + printlog "$name package verified. Installing package '$tmpDir/$name.pkg'." + pkgInstall=$(installer -verbose -dumplog -pkg "$tmpDir/$name.pkg" -target "/" 2>&1) + pkgInstallStatus=$(echo $?) + if [[ $pkgInstallStatus -ne 0 ]]; then + printlog "ERROR. $name package installation failed." + printlog "${pkgInstall}" + exitCode=2 + else + printlog "Installing $name package succes." + exitCode=0 + fi + else + printlog "ERROR. Package verification failed for $name before package installation could start. Download link may be invalid." + exitCode=3 + fi + fi + ((installationCount++)) + printlog "$installationCount time(s), exitCode $exitCode" + if [[ $installationCount -lt 3 ]]; then + if [[ $exitCode -gt 0 ]]; then + printlog "Sleep a bit before trying download and install again. $installationCount time(s)." + printlog "Remove $(rm -fv "$tmpDir/$name.pkg" || true)" + sleep 2 + fi + else + printlog "Download and install of $name succes." + fi + done + # Remove the temporary working directory + printlog "Deleting working directory '$tmpDir' and its contents." + printlog "Remove $(rm -Rfv "${tmpDir}" || true)" + # Handle installation errors + if [[ $exitCode != 0 ]]; then + printlog "ERROR. Installation of $name failed. Aborting." + caffexit $exitCode + else + printlog "$name version $appNewVersion installed!" + fi +else + printlog "$name version $appNewVersion already found. Perfect!" +fi + + +while [ "$(pgrep -l "Setup Assistant")" != "" ]; do + printlog "Setup Assistant Still Running. PID $setupAssistantProcess." + sleep 1 +done +printlog "Out of Setup Assistant." + +while [ "$(pgrep -l "Finder")" = "" ]; do + printlog "Finder process not found. Assuming device is at login screen. PID $finderProcess" + sleep 1 +done +printlog "Finder is running…" + +currentUser=$(stat -f "%Su" /dev/console) +currentUserID=$(id -u "$currentUser") +printlog "Logged in user is $currentUser with ID $currentUserID" + +# set icon based on whether computer is a desktop or laptop +#hwType=$(system_profiler SPHardwareDataType | grep "Model Identifier" | grep "Book" || true) +#if [ "$hwType" != "" ]; then +# LOGO_PATH="SF=laptopcomputer.and.arrow.down,weight=thin,colour1=#51a3ef,colour2=#5154ef" +#else +# LOGO_PATH="SF=desktopcomputer.and.arrow.down,weight=thin,colour1=#51a3ef,colour2=#5154ef" +#fi + +dialogCMD="$dialogApp -p --title \"$title\" \ +--message \"$message\" \ +--icon \"$LOGO_PATH\" \ +--progress $progress_total \ +--button1text \"Please Wait\" \ +--button1disabled" + +# create the list of apps +listitems="" +for app in "${apps[@]}"; do + listitems="$listitems --listitem '$(echo "$app" | cut -d ',' -f1)'" +done + +# final command to execute +dialogCMD="$dialogCMD $listitems" + +printlog "$dialogCMD" + +# Launch dialog and run it in the background sleep for a second to let thing initialise +printlog "About to launch Dialog." +eval "$dialogCMD" & +sleep 2 + +(for app in "${apps[@]}"; do + #step_progress=$(( 1 + progress_index )) + #dialog_command "progress: $step_progress" + sleep 0.5 + appCheck & +done + +wait) + +# Mark: Finishing + +# Prevent re-run of script if conditionFile is set +if [[ ! -z "$conditionFile" ]]; then + printlog "Touching condition file so script will not run again" + touch "$conditionFile" || true + printlog "$(ls -al "$conditionFile" || true)" +fi + +# all done. close off processing and enable the "Done" button +printlog "Finalizing." +dialog_command "progresstext: $endMessage" +dialog_command "progress: complete" +dialog_command "button1text: Done" +dialog_command "button1: enable" + +if [[ $displayEndMessageDialog -eq 1 ]]; then + message="$endMessage" + displayDialog & +fi + +sleep 1 +printlog $(rm -fv $dialog_command_file || true) +printlog $(rm -fv $counterFile || true) + +printlog "Ending" diff --git a/MDM/-install Dialog direct condition.sh b/MDM/-install Dialog direct condition.sh new file mode 100755 index 0000000..2d25e09 --- /dev/null +++ b/MDM/-install Dialog direct condition.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +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') + +destFile="/Library/Application Support/Dialog/Dialog.app" +versionKey="CFBundleShortVersionString" #CFBundleVersion + +currentInstalledVersion="$(defaults read "${destFile}/Contents/Info.plist" $versionKey || true)" +if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then + #echo "Let's install…" + exit 0 +else + #echo "No need!" + exit 1 +fi diff --git a/MDM/-install Dialog direct.sh b/MDM/-install Dialog direct.sh new file mode 100755 index 0000000..1b16e3c --- /dev/null +++ b/MDM/-install Dialog direct.sh @@ -0,0 +1,148 @@ +#!/bin/sh + +###################################################################### +# Installation of swiftDialog +# +# No customization below… +###################################################################### +# This script can be used to install swiftDialog directly from GitHub. +###################################################################### +# +# This script made by Søren Theilgaard +# https://github.com/Theile +# Twitter and MacAdmins Slack: @theilgaard +# +# Some functions and code from Installomator: +# https://github.com/Installomator/Installomator +# +###################################################################### +scriptVersion="9.4" +# v. 9.4 : 2022-09-14 : downloadURL can fall back on GitHub API. +# v. 9.3 : 2022-08-29 : Logging changed for current version. Improved installation with looping if it fails, so it can try again. Improved GitHub handling. +# v. 9.2.2 : 2022-06-17 : Check 1.1.1.1 for internet connection. +# v. 9.2 : 2022-05-19 : Built in installer for Installlomator. Universal script. +###################################################################### + +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# Mark: Constants, logging and caffeinate +log_message="Dialog install, v$scriptVersion" +label="Dialog-v$scriptVersion" + +log_location="/private/var/log/Installomator.log" +printlog(){ + timestamp=$(date +%F\ %T) + if [[ "$(whoami)" == "root" ]]; then + echo "$timestamp :: $label : $1" | tee -a $log_location + else + echo "$timestamp :: $label : $1" + fi +} +printlog "[LOG-BEGIN] ${log_message}" + +# Internet check +if [[ "$(nc -z -v -G 10 1.1.1.1 53 2>&1 | grep -io "succeeded")" != "succeeded" ]]; then + printlog "ERROR. No internet connection, we cannot continue." + exit 90 +fi + +# No sleeping +/usr/bin/caffeinate -d -i -m -u & +caffeinatepid=$! +caffexit () { + kill "$caffeinatepid" || true + pkill caffeinate || true + printlog "[LOG-END] Status $1" + exit $1 +} + +name="Dialog" +printlog "$name check for installation" +# download URL, version and Expected Team ID +# Method for GitHub pkg w. app version check +gitusername="bartreardon" +gitreponame="swiftDialog" +#printlog "$gitusername $gitreponame" +filetype="pkg" +downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") +fi +#printlog "$downloadURL" +appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') +#printlog "$appNewVersion" +expectedTeamID="PWA5E9TQ59" +destFile="/Library/Application Support/Dialog/Dialog.app" +versionKey="CFBundleShortVersionString" #CFBundleVersion + +currentInstalledVersion="$(defaults read "${destFile}/Contents/Info.plist" $versionKey || true)" +printlog "${name} version: $currentInstalledVersion" +if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then + printlog "$name not found or version not latest." + printlog "${destFile}" + printlog "Installing version ${appNewVersion}…" + # Create temporary working directory + tmpDir="$(mktemp -d || true)" + printlog "Created working directory '$tmpDir'" + # Download the installer package + printlog "Downloading $name package version $appNewVersion from: $downloadURL" + installationCount=0 + exitCode=9 + while [[ $installationCount -lt 3 && $exitCode -gt 0 ]]; do + curlDownload=$(curl -Ls "$downloadURL" -o "$tmpDir/$name.pkg" || true) + curlDownloadStatus=$(echo $?) + if [[ $curlDownloadStatus -ne 0 ]]; then + printlog "error downloading $downloadURL, with status $curlDownloadStatus" + printlog "${curlDownload}" + exitCode=1 + else + printlog "Download $name succes." + # Verify the download + teamID=$(spctl -a -vv -t install "$tmpDir/$name.pkg" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' || true) + printlog "Team ID for downloaded package: $teamID" + # Install the package if Team ID validates + if [ "$expectedTeamID" = "$teamID" ] || [ "$expectedTeamID" = "" ]; then + printlog "$name package verified. Installing package '$tmpDir/$name.pkg'." + pkgInstall=$(installer -verbose -dumplog -pkg "$tmpDir/$name.pkg" -target "/" 2>&1) + pkgInstallStatus=$(echo $?) + if [[ $pkgInstallStatus -ne 0 ]]; then + printlog "ERROR. $name package installation failed." + printlog "${pkgInstall}" + exitCode=2 + else + printlog "Installing $name package succes." + exitCode=0 + fi + else + printlog "ERROR. Package verification failed for $name before package installation could start. Download link may be invalid." + exitCode=3 + fi + fi + ((installationCount++)) + printlog "$installationCount time(s), exitCode $exitCode" + if [[ $installationCount -lt 3 ]]; then + if [[ $exitCode -gt 0 ]]; then + printlog "Sleep a bit before trying download and install again. $installationCount time(s)." + printlog "Remove $(rm -fv "$tmpDir/$name.pkg" || true)" + sleep 2 + fi + else + printlog "Download and install of $name succes." + fi + done + # Remove the temporary working directory + printlog "Deleting working directory '$tmpDir' and its contents." + printlog "Remove $(rm -Rfv "${tmpDir}" || true)" + # Handle installation errors + if [[ $exitCode != 0 ]]; then + printlog "ERROR. Installation of $name failed. Aborting." + caffexit $exitCode + else + printlog "$name version $appNewVersion installed!" + fi +else + printlog "$name version $appNewVersion already found. Perfect!" +fi + +caffexit 0 diff --git a/MDM/-install Installomator direct condition.sh b/MDM/-install Installomator direct condition.sh new file mode 100755 index 0000000..89cdda6 --- /dev/null +++ b/MDM/-install Installomator direct condition.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +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') + +destFile="/usr/local/Installomator/Installomator.sh" +if [[ ! -e "${destFile}" || "$(${destFile} version)" != "$appNewVersion" ]]; then + #echo "Let's install…" + exit 0 +else + #echo "No need!" + exit 1 +fi diff --git a/MDM/-install Installomator direct.sh b/MDM/-install Installomator direct.sh new file mode 100755 index 0000000..b822e34 --- /dev/null +++ b/MDM/-install Installomator direct.sh @@ -0,0 +1,147 @@ +#!/bin/sh + +###################################################################### +# Installation of Installomator +# +# No customization below… +###################################################################### +# This script can be used to install Installomator directly from GitHub. +###################################################################### +# +# This script made by Søren Theilgaard +# https://github.com/Theile +# Twitter and MacAdmins Slack: @theilgaard +# +# Some functions and code from Installomator: +# https://github.com/Installomator/Installomator +# +###################################################################### +scriptVersion="9.4" +# v. 9.4 : 2022-09-14 : downloadURL can fall back on GitHub API +# v. 9.3 : 2022-08-29 : Logging changed for current version. Improved installation with looping if it fails, so it can try again. Improved GitHub handling. +# v. 9.2.2 : 2022-06-17 : Check 1.1.1.1 for internet connection. +# v. 9.2 : 2022-05-19 : Built in installer for Installlomator. Universal script. +###################################################################### + +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# Mark: Constants, logging and caffeinate +log_message="Installomator install, v$scriptVersion" +label="Inst-v$scriptVersion" + +log_location="/private/var/log/Installomator.log" +printlog(){ + timestamp=$(date +%F\ %T) + if [[ "$(whoami)" == "root" ]]; then + echo "$timestamp :: $label : $1" | tee -a $log_location + else + echo "$timestamp :: $label : $1" + fi +} +printlog "[LOG-BEGIN] ${log_message}" + +# Internet check +if [[ "$(nc -z -v -G 10 1.1.1.1 53 2>&1 | grep -io "succeeded")" != "succeeded" ]]; then + printlog "ERROR. No internet connection, we cannot continue." + exit 90 +fi + +# No sleeping +/usr/bin/caffeinate -d -i -m -u & +caffeinatepid=$! +caffexit () { + kill "$caffeinatepid" || true + pkill caffeinate || true + printlog "[LOG-END] Status $1" + exit $1 +} + +name="Installomator" +printlog "$name check for installation" +# download URL, version and Expected Team ID +# Method for GitHub pkg +gitusername="Installomator" +gitreponame="Installomator" +#printlog "$gitusername $gitreponame" +filetype="pkg" +downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") +fi +#printlog "$downloadURL" +appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') +#printlog "$appNewVersion" +expectedTeamID="JME5BW3F3R" + +destFile="/usr/local/Installomator/Installomator.sh" +currentInstalledVersion="$(${destFile} version 2>/dev/null || true)" +printlog "${destFile} version: $currentInstalledVersion" +if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then + printlog "$name not found or version not latest." + printlog "${destFile}" + printlog "Installing version ${appNewVersion} ..." + # Create temporary working directory + tmpDir="$(mktemp -d || true)" + printlog "Created working directory '$tmpDir'" + # Download the installer package + printlog "Downloading $name package version $appNewVersion from: $downloadURL" + installationCount=0 + exitCode=9 + while [[ $installationCount -lt 3 && $exitCode -gt 0 ]]; do + curlDownload=$(curl -Ls "$downloadURL" -o "$tmpDir/$name.pkg" || true) + curlDownloadStatus=$(echo $?) + if [[ $curlDownloadStatus -ne 0 ]]; then + printlog "error downloading $downloadURL, with status $curlDownloadStatus" + printlog "${curlDownload}" + exitCode=1 + else + printlog "Download $name succes." + # Verify the download + teamID=$(spctl -a -vv -t install "$tmpDir/$name.pkg" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' || true) + printlog "Team ID for downloaded package: $teamID" + # Install the package if Team ID validates + if [ "$expectedTeamID" = "$teamID" ] || [ "$expectedTeamID" = "" ]; then + printlog "$name package verified. Installing package '$tmpDir/$name.pkg'." + pkgInstall=$(installer -verbose -dumplog -pkg "$tmpDir/$name.pkg" -target "/" 2>&1) + pkgInstallStatus=$(echo $?) + if [[ $pkgInstallStatus -ne 0 ]]; then + printlog "ERROR. $name package installation failed." + printlog "${pkgInstall}" + exitCode=2 + else + printlog "Installing $name package succes." + exitCode=0 + fi + else + printlog "ERROR. Package verification failed for $name before package installation could start. Download link may be invalid." + exitCode=3 + fi + fi + ((installationCount++)) + printlog "$installationCount time(s), exitCode $exitCode" + if [[ $installationCount -lt 3 ]]; then + if [[ $exitCode -gt 0 ]]; then + printlog "Sleep a bit before trying download and install again. $installationCount time(s)." + printlog "Remove $(rm -fv "$tmpDir/$name.pkg" || true)" + sleep 2 + fi + else + printlog "Download and install of $name succes." + fi + done + # Remove the temporary working directory + printlog "Deleting working directory '$tmpDir' and its contents." + printlog "Remove $(rm -Rfv "${tmpDir}" || true)" + # Handle installation errors + if [[ $exitCode != 0 ]]; then + printlog "ERROR. Installation of $name failed. Aborting." + caffexit $exitCode + else + printlog "$name version $appNewVersion installed!" + fi +else + printlog "$name version $appNewVersion already found. Perfect!" +fi + +caffexit 0 diff --git a/MDM/App script.sh b/MDM/App script.sh deleted file mode 100755 index c7b4a10..0000000 --- a/MDM/App script.sh +++ /dev/null @@ -1,185 +0,0 @@ -#!/bin/zsh -# Installation using Installomator -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=$! -caffexit () { - kill "$caffeinatepid" - pkill caffeinate - exit $1 -} - -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 - -echo "[$(DATE)][LOG-END]" - -caffexit 0 - -# notify behavior -# NOTIFY=success -# options: -# - success notify the user on success -# - silent no notifications -# - all all notifications (great for Self Service installation) - - -# behavior when blocking processes are found -# BLOCKING_PROCESS_ACTION=tell_user -# options: -# - ignore continue even when blocking processes are found -# - quit app will be told to quit nicely, if running -# - quit_kill told to quit twice, then it will be killed -# Could be great for service apps, if they do not respawn -# - silent_fail exit script without prompt or installation -# - prompt_user show a user dialog for each blocking process found -# abort after three attempts to quit -# (only if user accepts to quit the apps, otherwise -# the update is cancelled). -# - prompt_user_then_kill -# show a user dialog for each blocking process found, -# attempt to quit two times, kill the process finally -# - prompt_user_loop -# Like prompt-user, but clicking "Not Now", will just wait an hour, -# and then it will ask again. -# WARNING! It might block the MDM agent on the machine, as -# the scripts gets stuct in waiting until the hour has passed, -# possibly blocking for other management actions in this time. -# - tell_user User will be showed a notification about the important update, -# but user is only allowed to quit and continue, and then we -# ask the app to quit. -# - tell_user_then_kill -# Show dialog 2 times, and if the quitting fails, the -# blocking processes will be killed. -# - kill kill process without prompting or giving the user a chance to save - - -# logo-icon used in dialog boxes if app is blocking -# LOGO=appstore -# options: -# - appstore Icon is Apple App Store (default) -# - jamf JAMF Pro -# - mosyleb Mosyle Business -# - mosylem Mosyle Manager (Education) -# - addigy Addigy -# path can also be set in the command call, and if file exists, it will be used. -# Like 'LOGO="/System/Applications/App\ Store.app/Contents/Resources/AppIcon.icns"' -# (spaces have to be escaped). - - -# App Store apps handling -# IGNORE_APP_STORE_APPS=no -# options: -# - no If installed app is from App Store (which include VPP installed apps) -# it will not be touched, no matter it's version (default) -# - yes Replace App Store (and VPP) version of app and handle future -# updates using Installomator, even if latest version. -# Shouldn’t give any problems for the user in most cases. -# Known bad example: Slack will loose all settings. - - -# install behavior -# INSTALL="" -# options: -# - When not set, software will only be installed -# if it is newer/different in version -# - force Install even if it’s the same version - - -# Re-opening of closed app -# REOPEN="yes" -# options: -# - yes App wil be reopened if it was closed -# - no App not reopened - - -######################## -# Often used labels: -######################## - -# firefox -# firefox_intl -# brave -# torbrowser -# googlechrome -# netnewswire - -# adobereaderdc -# textmate - -# cyberduck -# keka -# theunarchiver - -# vlc -# handbrake - -# inkscape - -# signal -# telegram -# whatsapp - -# hazel -# devonthink - -# teamviewerqs -# zoom - -# malwarebytes -# githubdesktop -# sublimetext -# textmate -# visualstudiocode - -# microsoftskypeforbusiness -# microsoftteams -# microsoftyammer -# microsoftedgeenterprisestable -# microsoftedgeconsumerstable -# microsoftsharepointplugin -# microsoftdefenderatp - -# googledrivefilestream - -# cdef -# desktoppr -# supportapp -# xink -# wwdc diff --git a/MDM/App-install with Dialog and dockutil/Addigy condition notes.sh b/MDM/App-install with Dialog and dockutil/Addigy condition notes.sh new file mode 100644 index 0000000..41d5d70 --- /dev/null +++ b/MDM/App-install with Dialog and dockutil/Addigy condition notes.sh @@ -0,0 +1,124 @@ +#!/bin/sh + +# Addigy condition +# These are my notes for how I can extract all the label lines from Installomator.sh, evaluate those, and check if installed version is the latest version. +# This script contains functions from Installomator. +label="googlechromepkg" + +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# Functions from Installomator +downloadURLFromGit() { # $1 git user name, $2 git repo name + gitusername=${1?:"no git user name"} + gitreponame=${2?:"no git repo name"} + + if [[ $type == "pkgInDmg" ]]; then + filetype="dmg" + elif [[ $type == "pkgInZip" ]]; then + filetype="zip" + else + filetype=$type + fi + + if [ -n "$archiveName" ]; then + downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) + if [[ "$(echo $downloadURL | grep -ioE "https.*$archiveName")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") + fi + else + downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1) + if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") + fi + fi + if [ -z "$downloadURL" ]; then + cleanupAndExit 14 "could not retrieve download URL for $gitusername/$gitreponame" ERROR + else + echo "$downloadURL" + return 0 + fi +} + +versionFromGit() { + # credit: Søren Theilgaard (@theilgaard) + # $1 git user name, $2 git repo name + gitusername=${1?:"no git user name"} + gitreponame=${2?:"no git repo name"} + + #appNewVersion=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | grep tag_name | cut -d '"' -f 4 | sed 's/[^0-9\.]//g') + appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') + if [ -z "$appNewVersion" ]; then + printlog "could not retrieve version number for $gitusername/$gitreponame" WARN + appNewVersion="" + else + echo "$appNewVersion" + return 0 + fi +} + + +# Handling of differences in xpath between Catalina and Big Sur +xpath() { + # the xpath tool changes in Big Sur and now requires the `-e` option + if [[ $(sw_vers -buildVersion) > "20A" ]]; then + /usr/bin/xpath -e $@ + # alternative: switch to xmllint (which is not perl) + #xmllint --xpath $@ - + else + /usr/bin/xpath $@ + fi +} + +# from @Pico: https://macadmins.slack.com/archives/CGXNNJXJ9/p1652222365989229?thread_ts=1651786411.413349&cid=CGXNNJXJ9 +getJSONValue() { + # $1: JSON string OR file path to parse (tested to work with up to 1GB string and 2GB file). + # $2: JSON key path to look up (using dot or bracket notation). + printf '%s' "$1" | /usr/bin/osascript -l 'JavaScript' \ + -e "let json = $.NSString.alloc.initWithDataEncoding($.NSFileHandle.fileHandleWithStandardInput.readDataToEndOfFile$(/usr/bin/uname -r | /usr/bin/awk -F '.' '($1 > 18) { print "AndReturnError(ObjC.wrap())" }'), $.NSUTF8StringEncoding)" \ + -e 'if ($.NSFileManager.defaultManager.fileExistsAtPath(json)) json = $.NSString.stringWithContentsOfFileEncodingError(json, $.NSUTF8StringEncoding, ObjC.wrap())' \ + -e "const value = JSON.parse(json.js)$([ -n "${2%%[.[]*}" ] && echo '.')$2" \ + -e 'if (typeof value === "object") { JSON.stringify(value, null, 4) } else { value }' +} + +# Mark: Script +labelScript=$(grep -E -m 1 -A 30 "^$label"'(\)|\|\\)$' "/usr/local/Installomator/Installomator.sh" | grep -B 30 -m 1 ";;") +echo $labelScript +eval $labelScript +echo $appNewVersion + + + +############################## +printLines=0; while read line; do; if [[ $printLines -eq 1 || "$(echo $line | grep -oE "^googlechromepkg")" != "" ]]; then; printLines=1; echo $line; fi; done < "/usr/local/Installomator/Installomator.sh" + +printLines=0; while read line; do; if [[ $printLines -eq 1 ]]; then; if [[ "$(echo $line | grep ";;")" == "" ]]; then; echo $line; else; printLines=0; fi ; elif [[ "$(echo $line | grep -oE "^googlechromepkg")" != "" ]]; then; printLines=1; fi; done < "/usr/local/Installomator/Installomator.sh" + +labelLines="$(printLines=0; while read line; do; if [[ $printLines -eq 1 ]]; then; if [[ "$(echo $line | grep ";;")" == "" ]]; then; echo $line; else; return; fi ; elif [[ "$(echo $line | grep -oE "^googlechromepkg")" != "" ]]; then; printLines=1; fi; done < "/usr/local/Installomator/Installomator.sh")"; echo $labelLines + +label="googlechromepkg";labelLines="$(printLines=0; while read line; do; if [[ $printLines -eq 1 ]]; then; if [[ "$(echo $line | grep ";;")" == "" ]]; then; echo $line; else; return; fi ; elif [[ "$(echo $line | grep -oE "^$label")" != "" ]]; then; printLines=1; fi; done < "/usr/local/Installomator/Installomator.sh")"; eval $labelLines ; echo $appNewVersion + + +label="googlechromepkg" +labelLines="$(printLines=0 +while read line; do + if [[ $printLines -eq 1 ]]; then + if [[ "$(echo $label | grep ";;")" == "" ]]; then + echo $line + else + return + fi + elif [[ "$(echo $line | grep -oE "^$label")" != "" ]]; then + printLines=1 + fi +done < "/usr/local/Installomator/Installomator.sh")" +eval $labelLines +echo $appNewVersion + + + + + + diff --git a/MDM/App-install with Dialog and dockutil/App VFA SS github.sh b/MDM/App-install with Dialog and dockutil/App VFA SS github.sh new file mode 100755 index 0000000..7671062 --- /dev/null +++ b/MDM/App-install with Dialog and dockutil/App VFA SS github.sh @@ -0,0 +1,279 @@ +#!/bin/sh + +# Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) +# Installation of software using `valuesfromarguments` to install a custom software using Installomator through GitHub + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +#item="gfxcardstatus" # enter the software to install (if it has a label in future version of Installomator) + +# Label variables below + +# GitHub functions +downloadURLFromGit() { # $1 git user name, $2 git repo name + gitusername=${1?:"no git user name"} + gitreponame=${2?:"no git repo name"} + + if [[ $type == "pkgInDmg" ]]; then + filetype="dmg" + elif [[ $type == "pkgInZip" ]]; then + filetype="zip" + else + filetype=$type + fi + + if [ -n "$archiveName" ]; then + downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1 || true) + if [[ "$(echo $downloadURL | grep -ioE "https.*$archiveName" || true)" == "" ]]; then + #printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }" || true) + fi + else + downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1 || true) + if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype" || true)" == "" ]]; then + #printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }" || true) + fi + fi + if [ -z "$downloadURL" ]; then + echo "could not retrieve download URL for $gitusername/$gitreponame" + exit 1 + else + echo "$downloadURL" + return 0 + fi +} +versionFromGit() { + # credit: Søren Theilgaard (@theilgaard) + # $1 git user name, $2 git repo name + gitusername=${1?:"no git user name"} + gitreponame=${2?:"no git repo name"} + + #appNewVersion=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | grep tag_name | cut -d '"' -f 4 | sed 's/[^0-9\.]//g' || true) + appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g' || true) + if [ -z "$appNewVersion" ]; then + #echo "could not retrieve version number for $gitusername/$gitreponame" + appNewVersion="" + else + echo "$appNewVersion" + return 0 + fi +} + +# Variables for label +name="gfxCardStatus" +type="zip" +downloadURL="$(downloadURLFromGit codykrieger gfxCardStatus)" +appNewVersion="$(versionFromGit codykrieger gfxCardStatus)" +expectedTeamID="LF22FTQC25" + +# Dialog icon +icon="" +# icon should be a file system path or an URL to an online PNG. +# In Mosyle an URL can be found by copy picture address from a Custom Command icon. + +# dockutil variables +addToDock="1" # with dockutil after installation (0 if not) +appPath="/Applications/$name.app" + +# Other variables +dialog_command_file="/var/tmp/dialog.log" +dialogApp="/Library/Application Support/Dialog/Dialog.app" +dockutil="/usr/local/bin/dockutil" + +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "item" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 10.1 : github-functions added. Improved appIcon handling. Can add the app to Dock using dockutil. +# v. 10 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $item" + +dialogUpdate() { + # $1: dialog command + local dcommand="$1" + + if [[ -n $dialog_command_file ]]; then + echo "$dcommand" >> "$dialog_command_file" + echo "Dialog: $dcommand" + fi +} +checkCmdOutput () { + # $1: cmdOutput + local cmdOutput="$1" + 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 "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" + else + echo "ERROR installing ${item}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" + fi +} + +# Check the currently logged in user +currentUser=$(stat -f "%Su" /dev/console) +if [ -z "$currentUser" ] || [ "$currentUser" = "loginwindow" ] || [ "$currentUser" = "_mbsetupuser" ] || [ "$currentUser" = "root" ]; then + echo "ERROR. Logged in user is $currentUser! Cannot proceed." + exit 97 +fi +# Get the current user's UID for dockutil +uid=$(id -u "$currentUser") +# Find the home folder of the user +userHome="$(dscl . -read /users/${currentUser} NFSHomeDirectory | awk '{print $2}')" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Mark: Installation begins +installomatorVersion="$(${destFile} version | cut -d "." -f1 || true)" + +if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; then + echo "Installomator should be at least version 10 to support Dialog. Installed version $installomatorVersion." + echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." + installomatorNotify="NOTIFY=all" +else + installomatorNotify="" + # check for Swift Dialog + if [[ ! -d $dialogApp ]]; then + echo "Cannot find dialog at $dialogApp" + # Install using Installlomator + cmdOutput="$(${destFile} dialog LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + + # Configure and display swiftDialog + #itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) + itemName="$name" + if [[ "$itemName" != "#" ]]; then + message="Installing ${itemName}…" + else + message="Installing ${item}…" + fi + echo "$item $itemName" + + # If no icon defined we are trying to search for installed app icon + if [[ "$icon" == "" ]]; then + appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) + appIcon=$(defaults read "${appPath}/Contents/Info.plist" CFBundleIconFile || true) + if [[ "$(echo "$appIcon" | grep -io ".icns")" == "" ]]; then + appIcon="${appIcon}.icns" + fi + icon="${appPath}/Contents/Resources/${appIcon}" + echo "${icon}" + if [ ! -f "${icon}" ]; then + icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + echo "${icon}" + + # display first screen + open -a "$dialogApp" --args \ + --title none \ + --icon "$icon" \ + --message "$message" \ + --mini \ + --progress 100 \ + --position bottomright \ + --movable \ + --commandfile "$dialog_command_file" + + # give everything a moment to catch up + sleep 0.1 +fi + +# Install software using Installomator with valuesfromarguments +cmdOutput="$(${destFile} valuesfromarguments LOGO=$LOGO \ + name=${name} \ + type=${type} \ + downloadURL=\"$downloadURL\" \ + appNewVersion=${appNewVersion} \ + expectedTeamID=${expectedTeamID} \ + ${installomatorOptions} || true)" + +checkCmdOutput $cmdOutput + +# Mark: dockutil stuff +if [[ $addToDock -eq 1 ]]; then + dialogUpdate "progresstext: Adding to Dock" + if [[ ! -d $dockutil ]]; then + echo "Cannot find dockutil at $dockutil, trying installation" + # Install using Installlomator + cmdOutput="$(${destFile} dockutil LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + echo "Adding to Dock" + $dockutil --add "${appPath}" "${userHome}/Library/Preferences/com.apple.dock.plist" || true + sleep 1 +else + echo "Not adding to Dock." +fi + +# Mark: Ending +if [[ $installomatorVersion -lt 10 ]]; then + echo "Again skipping Dialog stuff." +else + # close and quit dialog + dialogUpdate "progress: complete" + dialogUpdate "progresstext: Done" + + # pause a moment + sleep 0.5 + + dialogUpdate "quit:" + + # let everything catch up + sleep 0.5 + + # just to be safe + #killall "Dialog" 2>/dev/null || true +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install with Dialog and dockutil/App VFA SS.sh b/MDM/App-install with Dialog and dockutil/App VFA SS.sh new file mode 100755 index 0000000..a7b84a7 --- /dev/null +++ b/MDM/App-install with Dialog and dockutil/App VFA SS.sh @@ -0,0 +1,227 @@ +#!/bin/sh + +# Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) +# Installation of software using `valuesfromarguments` to install a custom software using Installomator + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +#item="" # enter the software to install (if it has a label in future version of Installomator) + +# Variables for label +name="ClickShare" +type="appInDmgInZip" +downloadURL="https://www.barco.com$( curl -fs "https://www.barco.com/en/clickshare/app" | grep -A6 -i "macos" | grep -i "FileNumber" | tr '"' "\n" | grep -i "FileNumber" )" +appNewVersion="$(eval "$( echo $downloadURL | sed -E 's/.*(MajorVersion.*BuildVersion=[0-9]*).*/\1/' | sed 's/&//g' )" ; ((MajorVersion++)) ; ((MajorVersion--)); ((MinorVersion++)) ; ((MinorVersion--)); ((PatchVersion++)) ; ((PatchVersion--)); ((BuildVersion++)) ; ((BuildVersion--)); echo "${MajorVersion}.${MinorVersion}.${PatchVersion}-b${BuildVersion}")" +expectedTeamID="P6CDJZR997" + +# Dialog icon +icon="" +# icon should be a file system path or an URL to an online PNG. +# In Mosyle an URL can be found by copy picture address from a Custom Command icon. + +# dockutil variables +addToDock="1" # with dockutil after installation (0 if not) +appPath="/Applications/$name.app" + +# Other variables +dialog_command_file="/var/tmp/dialog.log" +dialogApp="/Library/Application Support/Dialog/Dialog.app" +dockutil="/usr/local/bin/dockutil" + +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "item" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 10.1 : Improved appIcon handling. Can add the app to Dock using dockutil +# v. 10 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $item" + +dialogUpdate() { + # $1: dialog command + local dcommand="$1" + + if [[ -n $dialog_command_file ]]; then + echo "$dcommand" >> "$dialog_command_file" + echo "Dialog: $dcommand" + fi +} +checkCmdOutput () { + # $1: cmdOutput + local cmdOutput="$1" + 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 "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" + else + echo "ERROR installing ${item}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" + fi +} + +# Check the currently logged in user +currentUser=$(stat -f "%Su" /dev/console) +if [ -z "$currentUser" ] || [ "$currentUser" = "loginwindow" ] || [ "$currentUser" = "_mbsetupuser" ] || [ "$currentUser" = "root" ]; then + echo "ERROR. Logged in user is $currentUser! Cannot proceed." + exit 97 +fi +# Get the current user's UID for dockutil +uid=$(id -u "$currentUser") +# Find the home folder of the user +userHome="$(dscl . -read /users/${currentUser} NFSHomeDirectory | awk '{print $2}')" + +# Verify that Installomator has been installed +#destFile="/usr/local/Installomator/Installomator.sh" +destFile="/usr/local/Installomator/Installomator10.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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Mark: Installation begins +installomatorVersion="$(${destFile} version | cut -d "." -f1 || true)" + +if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; then + echo "Installomator should be at least version 10 to support Dialog. Installed version $installomatorVersion." + echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." + installomatorNotify="NOTIFY=all" +else + installomatorNotify="" + # check for Swift Dialog + if [[ ! -d $dialogApp ]]; then + echo "Cannot find dialog at $dialogApp" + # Install using Installlomator + cmdOutput="$(${destFile} dialog LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + + # Configure and display swiftDialog + #itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) + itemName="$name" + if [[ "$itemName" != "#" ]]; then + message="Installing ${itemName}…" + else + message="Installing ${item}…" + fi + echo "$item $itemName" + + # If no icon defined we are trying to search for installed app icon + if [[ "$icon" == "" ]]; then + appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) + appIcon=$(defaults read "${appPath}/Contents/Info.plist" CFBundleIconFile || true) + if [[ "$(echo "$appIcon" | grep -io ".icns")" == "" ]]; then + appIcon="${appIcon}.icns" + fi + icon="${appPath}/Contents/Resources/${appIcon}" + echo "${icon}" + if [ ! -f "${icon}" ]; then + icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + echo "${icon}" + + # display first screen + open -a "$dialogApp" --args \ + --title none \ + --icon "$icon" \ + --message "$message" \ + --mini \ + --progress 100 \ + --position bottomright \ + --movable \ + --commandfile "$dialog_command_file" + + # give everything a moment to catch up + sleep 0.1 +fi + +# Install software using Installomator with valuesfromarguments +cmdOutput="$(${destFile} valuesfromarguments LOGO=$LOGO \ + name=${name} \ + type=${type} \ + downloadURL=\"$downloadURL\" \ + appNewVersion=${appNewVersion} \ + expectedTeamID=${expectedTeamID} \ + ${installomatorOptions} || true)" + +checkCmdOutput $cmdOutput + +# Mark: dockutil stuff +if [[ $addToDock -eq 1 ]]; then + dialogUpdate "progresstext: Adding to Dock" + if [[ ! -d $dockutil ]]; then + echo "Cannot find dockutil at $dockutil, trying installation" + # Install using Installlomator + cmdOutput="$(${destFile} dockutil LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + echo "Adding to Dock" + $dockutil --add "${appPath}" "${userHome}/Library/Preferences/com.apple.dock.plist" || true + sleep 1 +else + echo "Not adding to Dock." +fi + +# Mark: Ending +if [[ $installomatorVersion -lt 10 ]]; then + echo "Again skipping Dialog stuff." +else + # close and quit dialog + dialogUpdate "progress: complete" + dialogUpdate "progresstext: Done" + + # pause a moment + sleep 0.5 + + dialogUpdate "quit:" + + # let everything catch up + sleep 0.5 + + # just to be safe + #killall "Dialog" 2>/dev/null || true +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install with Dialog and dockutil/App browser-security.sh b/MDM/App-install with Dialog and dockutil/App browser-security.sh new file mode 100755 index 0000000..d9eb405 --- /dev/null +++ b/MDM/App-install with Dialog and dockutil/App browser-security.sh @@ -0,0 +1,211 @@ +#!/bin/sh + +# Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +item="firefoxpkg" # enter the software to install +# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg + +# Dialog icon +icon="https://mosylebusinessweb.blob.core.windows.net/envoit-public/customcommand_icon-envoit_3e37cc23e3fd8d29b1fbe85bc3b3923b323627dc83153cf673.png" +# icon should be a file system path or an URL to an online PNG. +# In Mosyle an URL can be found by copy picture address from a Custom Command icon. + +# dockutil variables +addToDock="1" # with dockutil after installation (0 if not) +appPath="/Applications/Firefox.app" + +# Other variables +dialog_command_file="/var/tmp/dialog.log" +dialogApp="/Library/Application Support/Dialog/Dialog.app" +dockutil="/usr/local/bin/dockutil" + +installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "item" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 10.1 : Improved appIcon handling. Can add the app to Dock using dockutil +# v. 10 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $item" + +dialogUpdate() { + # $1: dialog command + local dcommand="$1" + + if [[ -n $dialog_command_file ]]; then + echo "$dcommand" >> "$dialog_command_file" + echo "Dialog: $dcommand" + fi +} +checkCmdOutput () { + # $1: cmdOutput + local cmdOutput="$1" + 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 "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" + else + echo "ERROR installing ${item}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" + fi +} + +# Check the currently logged in user +currentUser=$(stat -f "%Su" /dev/console) +if [ -z "$currentUser" ] || [ "$currentUser" = "loginwindow" ] || [ "$currentUser" = "_mbsetupuser" ] || [ "$currentUser" = "root" ]; then + echo "ERROR. Logged in user is $currentUser! Cannot proceed." + exit 97 +fi +# Get the current user's UID for dockutil +uid=$(id -u "$currentUser") +# Find the home folder of the user +userHome="$(dscl . -read /users/${currentUser} NFSHomeDirectory | awk '{print $2}')" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Mark: Installation begins +installomatorVersion="$(${destFile} version | cut -d "." -f1 || true)" + +if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; then + echo "Installomator should be at least version 10 to support Dialog. Installed version $installomatorVersion." + echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." + installomatorNotify="NOTIFY=all" +else + installomatorNotify="" + # check for Swift Dialog + if [[ ! -d $dialogApp ]]; then + echo "Cannot find dialog at $dialogApp" + # Install using Installlomator + cmdOutput="$(${destFile} dialog LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + + # Configure and display swiftDialog + itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) + if [[ "$itemName" != "#" ]]; then + message="Installing ${itemName}…" + else + message="Installing ${item}…" + fi + echo "$item $itemName" + + # If no icon defined we are trying to search for installed app icon + if [[ "$icon" == "" ]]; then + appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) + appIcon=$(defaults read "${appPath}/Contents/Info.plist" CFBundleIconFile || true) + if [[ "$(echo "$appIcon" | grep -io ".icns")" == "" ]]; then + appIcon="${appIcon}.icns" + fi + icon="${appPath}/Contents/Resources/${appIcon}" + echo "${icon}" + if [ ! -f "${icon}" ]; then + icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + echo "${icon}" + + # display first screen + open -a "$dialogApp" --args \ + --title none \ + --icon "$icon" \ + --message "$message" \ + --mini \ + --progress 100 \ + --position bottomright \ + --movable \ + --commandfile "$dialog_command_file" + + # give everything a moment to catch up + sleep 0.1 +fi + +# Install software using Installomator +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} ${installomatorNotify} || true)" +checkCmdOutput $cmdOutput + +# Mark: dockutil stuff +if [[ $addToDock -eq 1 ]]; then + dialogUpdate "progresstext: Adding to Dock" + if [[ ! -d $dockutil ]]; then + echo "Cannot find dockutil at $dockutil, trying installation" + # Install using Installlomator + cmdOutput="$(${destFile} dockutil LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + echo "Adding to Dock" + $dockutil --add "${appPath}" "${userHome}/Library/Preferences/com.apple.dock.plist" || true + sleep 1 +else + echo "Not adding to Dock." +fi + +# Mark: Ending +if [[ $installomatorVersion -lt 10 ]]; then + echo "Again skipping Dialog stuff." +else + # close and quit dialog + dialogUpdate "progress: complete" + dialogUpdate "progresstext: Done" + + # pause a moment + sleep 0.5 + + dialogUpdate "quit:" + + # let everything catch up + sleep 0.5 + + # just to be safe + #killall "Dialog" 2>/dev/null || true +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install with Dialog and dockutil/App normal SS multi-app.sh b/MDM/App-install with Dialog and dockutil/App normal SS multi-app.sh new file mode 100644 index 0000000..9d3d593 --- /dev/null +++ b/MDM/App-install with Dialog and dockutil/App normal SS multi-app.sh @@ -0,0 +1,214 @@ +#!/bin/sh + +# Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +item="microsoftoffice365" # enter the software to install +# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg + +# Dialog icon +icon="" +# icon should be a file system path or an URL to an online PNG. +# In Mosyle an URL can be found by copy picture address from a Custom Command icon. + +# dockutil variables +addToDock="1" # with dockutil after installation (0 if not) +appPaths=("/Applications/Microsoft Outlook.app" "/Applications/Microsoft Word.app" "/Applications/Microsoft Excel.app" "/Applications/Microsoft PowerPoint.app" "/Applications/Microsoft OneNote.app") + +# Other variables +dialog_command_file="/var/tmp/dialog.log" +dialogApp="/Library/Application Support/Dialog/Dialog.app" +dockutil="/usr/local/bin/dockutil" + +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "item" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 10.1 : Improved appIcon handling. Can add the app to Dock using dockutil +# v. 10 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $item" + +dialogUpdate() { + # $1: dialog command + local dcommand="$1" + + if [[ -n $dialog_command_file ]]; then + echo "$dcommand" >> "$dialog_command_file" + echo "Dialog: $dcommand" + fi +} +checkCmdOutput () { + # $1: cmdOutput + local cmdOutput="$1" + 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 "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" + else + echo "ERROR installing ${item}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" + fi +} + +# Check the currently logged in user +currentUser=$(stat -f "%Su" /dev/console) +if [ -z "$currentUser" ] || [ "$currentUser" = "loginwindow" ] || [ "$currentUser" = "_mbsetupuser" ] || [ "$currentUser" = "root" ]; then + echo "ERROR. Logged in user is $currentUser! Cannot proceed." + exit 97 +fi +# Get the current user's UID for dockutil +uid=$(id -u "$currentUser") +# Find the home folder of the user +userHome="$(dscl . -read /users/${currentUser} NFSHomeDirectory | awk '{print $2}')" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Mark: Installation begins +installomatorVersion="$(${destFile} version | cut -d "." -f1 || true)" + +if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; then + echo "Installomator should be at least version 10 to support Dialog. Installed version $installomatorVersion." + echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." + installomatorNotify="NOTIFY=all" +else + installomatorNotify="" + # check for Swift Dialog + if [[ ! -d $dialogApp ]]; then + echo "Cannot find dialog at $dialogApp" + # Install using Installlomator + cmdOutput="$(${destFile} dialog LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + + # Configure and display swiftDialog + itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) + if [[ "$itemName" != "#" ]]; then + message="Installing ${itemName}…" + else + message="Installing ${item}…" + fi + echo "$item $itemName" + + # If no icon defined we are trying to search for installed app icon + if [[ "$icon" == "" ]]; then + appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) + appIcon=$(defaults read "${appPath}/Contents/Info.plist" CFBundleIconFile || true) + if [[ "$(echo "$appIcon" | grep -io ".icns")" == "" ]]; then + appIcon="${appIcon}.icns" + fi + icon="${appPath}/Contents/Resources/${appIcon}" + echo "${icon}" + if [ ! -f "${icon}" ]; then + icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + echo "${icon}" + + # display first screen + open -a "$dialogApp" --args \ + --title none \ + --icon "$icon" \ + --message "$message" \ + --mini \ + --progress 100 \ + --position bottomright \ + --movable \ + --commandfile "$dialog_command_file" + + # give everything a moment to catch up + sleep 0.1 +fi + +# Install software using Installomator +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} ${installomatorNotify} || true)" +checkCmdOutput $cmdOutput + +# Mark: dockutil stuff +if [[ $addToDock -eq 1 ]]; then + dialogUpdate "progresstext: Adding to Dock" + if [[ ! -d $dockutil ]]; then + echo "Cannot find dockutil at $dockutil, trying installation" + # Install using Installlomator + cmdOutput="$(${destFile} dockutil LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + echo "Adding to Dock" + for appPath in "${appPaths[@]}"; do + $dockutil --add "${appPath}" "${userHome}/Library/Preferences/com.apple.dock.plist" --no-restart || true + done + $dockutil --add "/AppThatDoesNotExistAnywhereOnDiskButMakingDockutilRestartTheDock" "${userHome}/Library/Preferences/com.apple.dock.plist" || true + sleep 1 +else + echo "Not adding to Dock." +fi + +# Mark: Ending +if [[ $installomatorVersion -lt 10 ]]; then + echo "Again skipping Dialog stuff." +else + # close and quit dialog + dialogUpdate "progress: complete" + dialogUpdate "progresstext: Done" + + # pause a moment + sleep 0.5 + + dialogUpdate "quit:" + + # let everything catch up + sleep 0.5 + + # just to be safe + #killall "Dialog" 2>/dev/null || true +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install with Dialog and dockutil/App normal SS.sh b/MDM/App-install with Dialog and dockutil/App normal SS.sh new file mode 100644 index 0000000..7326f4a --- /dev/null +++ b/MDM/App-install with Dialog and dockutil/App normal SS.sh @@ -0,0 +1,211 @@ +#!/bin/sh + +# Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +item="" # enter the software to install +# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg + +# Dialog icon +icon="" +# icon should be a file system path or an URL to an online PNG. +# In Mosyle an URL can be found by copy picture address from a Custom Command icon. + +# dockutil variables +addToDock="1" # with dockutil after installation (0 if not) +appPath="/Applications/.app" + +# Other variables +dialog_command_file="/var/tmp/dialog.log" +dialogApp="/Library/Application Support/Dialog/Dialog.app" +dockutil="/usr/local/bin/dockutil" + +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "item" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 10.1 : Improved appIcon handling. Can add the app to Dock using dockutil +# v. 10 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $item" + +dialogUpdate() { + # $1: dialog command + local dcommand="$1" + + if [[ -n $dialog_command_file ]]; then + echo "$dcommand" >> "$dialog_command_file" + echo "Dialog: $dcommand" + fi +} +checkCmdOutput () { + # $1: cmdOutput + local cmdOutput="$1" + 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 "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" + else + echo "ERROR installing ${item}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" + fi +} + +# Check the currently logged in user +currentUser=$(stat -f "%Su" /dev/console) +if [ -z "$currentUser" ] || [ "$currentUser" = "loginwindow" ] || [ "$currentUser" = "_mbsetupuser" ] || [ "$currentUser" = "root" ]; then + echo "ERROR. Logged in user is $currentUser! Cannot proceed." + exit 97 +fi +# Get the current user's UID for dockutil +uid=$(id -u "$currentUser") +# Find the home folder of the user +userHome="$(dscl . -read /users/${currentUser} NFSHomeDirectory | awk '{print $2}')" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Mark: Installation begins +installomatorVersion="$(${destFile} version | cut -d "." -f1 || true)" + +if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; then + echo "Installomator should be at least version 10 to support Dialog. Installed version $installomatorVersion." + echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." + installomatorNotify="NOTIFY=all" +else + installomatorNotify="" + # check for Swift Dialog + if [[ ! -d $dialogApp ]]; then + echo "Cannot find dialog at $dialogApp" + # Install using Installlomator + cmdOutput="$(${destFile} dialog LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + + # Configure and display swiftDialog + itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) + if [[ "$itemName" != "#" ]]; then + message="Installing ${itemName}…" + else + message="Installing ${item}…" + fi + echo "$item $itemName" + + # If no icon defined we are trying to search for installed app icon + if [[ "$icon" == "" ]]; then + appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) + appIcon=$(defaults read "${appPath}/Contents/Info.plist" CFBundleIconFile || true) + if [[ "$(echo "$appIcon" | grep -io ".icns")" == "" ]]; then + appIcon="${appIcon}.icns" + fi + icon="${appPath}/Contents/Resources/${appIcon}" + echo "${icon}" + if [ ! -f "${icon}" ]; then + icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + echo "${icon}" + + # display first screen + open -a "$dialogApp" --args \ + --title none \ + --icon "$icon" \ + --message "$message" \ + --mini \ + --progress 100 \ + --position bottomright \ + --movable \ + --commandfile "$dialog_command_file" + + # give everything a moment to catch up + sleep 0.1 +fi + +# Install software using Installomator +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} ${installomatorNotify} || true)" +checkCmdOutput $cmdOutput + +# Mark: dockutil stuff +if [[ $addToDock -eq 1 ]]; then + dialogUpdate "progresstext: Adding to Dock" + if [[ ! -d $dockutil ]]; then + echo "Cannot find dockutil at $dockutil, trying installation" + # Install using Installlomator + cmdOutput="$(${destFile} dockutil LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + echo "Adding to Dock" + $dockutil --add "${appPath}" "${userHome}/Library/Preferences/com.apple.dock.plist" || true + sleep 1 +else + echo "Not adding to Dock." +fi + +# Mark: Ending +if [[ $installomatorVersion -lt 10 ]]; then + echo "Again skipping Dialog stuff." +else + # close and quit dialog + dialogUpdate "progress: complete" + dialogUpdate "progresstext: Done" + + # pause a moment + sleep 0.5 + + dialogUpdate "quit:" + + # let everything catch up + sleep 0.5 + + # just to be safe + #killall "Dialog" 2>/dev/null || true +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install/App VFA.sh b/MDM/App-install/App VFA.sh new file mode 100755 index 0000000..19240cd --- /dev/null +++ b/MDM/App-install/App VFA.sh @@ -0,0 +1,93 @@ +#!/bin/sh + +# Installation using Installomator +# Installation of software using valuesfromarguments to install a custom software using Installomator + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +#item="" # enter the software to install (if it has a label in future version of Installomator) + +# Variables for label +name="ClickShare" +type="appInDmgInZip" +downloadURL="https://www.barco.com$( curl -fs "https://www.barco.com/en/clickshare/app" | grep -A6 -i "macos" | grep -i "FileNumber" | tr '"' "\n" | grep -i "FileNumber" )" +appNewVersion="$(eval "$( echo $downloadURL | sed -E 's/.*(MajorVersion.*BuildVersion=[0-9]*).*/\1/' | sed 's/&//g' )" ; ((MajorVersion++)) ; ((MajorVersion--)); ((MinorVersion++)) ; ((MinorVersion--)); ((PatchVersion++)) ; ((PatchVersion--)); ((BuildVersion++)) ; ((BuildVersion--)); echo "${MajorVersion}.${MinorVersion}.${PatchVersion}-b${BuildVersion}")" +expectedTeamID="P6CDJZR997" + +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user LOGGING=INFO NOTIFY=all" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "what" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $what" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Install software using Installomator with valuesfromarguments +cmdOutput="$(${destFile} valuesfromarguments LOGO=$LOGO \ + name=${name} \ + type=${type} \ + downloadURL=\"$downloadURL\" \ + appNewVersion=${appNewVersion} \ + expectedTeamID=${expectedTeamID} \ + ${installomatorOptions} || 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} -eq 0 ]] ; then + echo "${what} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" +else + echo "ERROR installing ${what}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install/App browser-security Auto-install.sh b/MDM/App-install/App browser-security Auto-install.sh new file mode 100644 index 0000000..dfd0ada --- /dev/null +++ b/MDM/App-install/App browser-security Auto-install.sh @@ -0,0 +1,79 @@ +#!/bin/sh + +# Installation using Installomator + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +what="firefoxpkg" # enter the software to install +# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg + +installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "what" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $what" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Install software using Installomator +cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || 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} -eq 0 ]] ; then + echo "${what} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" +else + echo "ERROR installing ${what}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install/App browser-security SS.sh b/MDM/App-install/App browser-security SS.sh new file mode 100644 index 0000000..829ae5a --- /dev/null +++ b/MDM/App-install/App browser-security SS.sh @@ -0,0 +1,79 @@ +#!/bin/sh + +# Installation using Installomator + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +what="" # enter the software to install +# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg + +installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit NOTIFY=all" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "what" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $what" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Install software using Installomator +cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || 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} -eq 0 ]] ; then + echo "${what} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" +else + echo "ERROR installing ${what}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install/App normal Auto-install.sh b/MDM/App-install/App normal Auto-install.sh new file mode 100644 index 0000000..aa7d624 --- /dev/null +++ b/MDM/App-install/App normal Auto-install.sh @@ -0,0 +1,79 @@ +#!/bin/sh + +# Installation using Installomator + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +what="" # enter the software to install +# Examples: adobecreativeclouddesktop, textmate, vlc + +installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "what" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $what" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Install software using Installomator +cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || 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} -eq 0 ]] ; then + echo "${what} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" +else + echo "ERROR installing ${what}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install/App normal SS.sh b/MDM/App-install/App normal SS.sh new file mode 100644 index 0000000..98aa7c1 --- /dev/null +++ b/MDM/App-install/App normal SS.sh @@ -0,0 +1,79 @@ +#!/bin/sh + +# Installation using Installomator + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +what="" # enter the software to install +# Examples: adobecreativeclouddesktop, textmate, vlc + +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=all" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "what" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $what" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Install software using Installomator +cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || 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} -eq 0 ]] ; then + echo "${what} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" +else + echo "ERROR installing ${what}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install/App service Auto-install.sh b/MDM/App-install/App service Auto-install.sh new file mode 100644 index 0000000..8e0509a --- /dev/null +++ b/MDM/App-install/App service Auto-install.sh @@ -0,0 +1,208 @@ +#!/bin/sh + +# Installation using Installomator + +LOGO="addigy" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +item="xink" # enter the software to install +# Examples: desktoppr, dockutil, supportapp, applenyfonts, applesfpro, applesfmono, applesfcompact, nomad, nudge, shield, xink + +# Dialog icon +icon="" +# icon should be a file system path or an URL to an online PNG. +# In Mosyle an URL can be found by copy picture address from a Custom Command icon. + +# dockutil variables +addToDock="1" # with dockutil after installation (0 if not) +appPath="/Applications/Xink.app" + +# Other variables +dialog_command_file="/var/tmp/dialog.log" +dialogApp="/Library/Application Support/Dialog/Dialog.app" +dockutil="/usr/local/bin/dockutil" + +installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "item" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 10.1 : Can add the app to Dock using dockutil +# v. 10 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $item" + +dialogUpdate() { + # $1: dialog command + local dcommand="$1" + + if [[ -n $dialog_command_file ]]; then + echo "$dcommand" >> "$dialog_command_file" + echo "Dialog: $dcommand" + fi +} +checkCmdOutput () { + # $1: cmdOutput + local cmdOutput="$1" + 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 "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" + else + echo "ERROR installing ${item}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" + fi +} + +# Check the currently logged in user +currentUser=$(stat -f "%Su" /dev/console) +if [ -z "$currentUser" ] || [ "$currentUser" = "loginwindow" ] || [ "$currentUser" = "_mbsetupuser" ] || [ "$currentUser" = "root" ]; then + echo "ERROR. Logged in user is $currentUser! Cannot proceed." + exit 97 +fi +# Get the current user's UID for dockutil +uid=$(id -u "$currentUser") +# Find the home folder of the user +userHome="$(dscl . -read /users/${currentUser} NFSHomeDirectory | awk '{print $2}')" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Mark: Installation begins +installomatorVersion="$(${destFile} version | cut -d "." -f1 || true)" + +if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; then + echo "Installomator should be at least version 10 to support Dialog. Installed version $installomatorVersion." + echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." + installomatorNotify="NOTIFY=all" +else + installomatorNotify="" + # check for Swift Dialog + if [[ ! -d $dialogApp ]]; then + echo "Cannot find dialog at $dialogApp" + # Install using Installlomator + cmdOutput="$(${destFile} dialog LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + + # Configure and display swiftDialog + itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) + if [[ "$itemName" != "#" ]]; then + message="Installing ${itemName}…" + else + message="Installing ${item}…" + fi + echo "$item $itemName" + + # If no icon defined we are trying to search for installed app icon + if [[ "$icon" == "" ]]; then + appPath=$(mdfind "kind:application AND name:$itemName" | head -1) + appIcon=$(defaults read "${appPath}/Contents/Info.plist" CFBundleIconFile) + icon="${appPath}/Contents/Resources/${appIcon}" + echo "${icon}" + if [ ! -f "${icon}" ]; then + icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + echo "${icon}" + + # display first screen + open -a "$dialogApp" --args \ + --title none \ + --icon "$icon" \ + --message "$message" \ + --mini \ + --progress 100 \ + --position bottomright \ + --movable \ + --commandfile "$dialog_command_file" + + # give everything a moment to catch up + sleep 0.1 +fi + +# Install software using Installomator +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} ${installomatorNotify} || true)" +checkCmdOutput $cmdOutput + +# Mark: dockutil stuff +if [[ $addToDock -eq 1 ]]; then + dialogUpdate "progresstext: Adding to Dock" + if [[ ! -d $dockutil ]]; then + echo "Cannot find dockutil at $dockutil, trying installation" + # Install using Installlomator + cmdOutput="$(${destFile} dockutil LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + echo "Adding to Dock" + $dockutil --add "${appPath}" "${userHome}/Library/Preferences/com.apple.dock.plist" || true + sleep 1 +else + echo "Not adding to Dock." +fi + +# Mark: Ending +if [[ $installomatorVersion -lt 10 ]]; then + echo "Again skipping Dialog stuff." +else + # close and quit dialog + dialogUpdate "progress: complete" + dialogUpdate "progresstext: Done" + + # pause a moment + sleep 0.5 + + dialogUpdate "quit:" + + # let everything catch up + sleep 0.5 + + # just to be safe + #killall "Dialog" 2>/dev/null || true +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-loop script.sh b/MDM/App-loop script.sh deleted file mode 100755 index 8fb33e7..0000000 --- a/MDM/App-loop script.sh +++ /dev/null @@ -1,193 +0,0 @@ -#!/bin/zsh -# Installation using Installomator -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 "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 & -caffeinatepid=$! -caffexit () { - kill "$caffeinatepid" - pkill caffeinate - exit $1 -} - -# Count errors -errorCount=0 - -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 - -echo -echo "Errors: $errorCount" -echo "[$(DATE)][LOG-END]" - -caffexit $errorCount - -# notify behavior -# NOTIFY=success -# options: -# - success notify the user on success -# - silent no notifications -# - all all notifications (great for Self Service installation) - - -# behavior when blocking processes are found -# BLOCKING_PROCESS_ACTION=tell_user -# options: -# - ignore continue even when blocking processes are found -# - quit app will be told to quit nicely, if running -# - quit_kill told to quit twice, then it will be killed -# Could be great for service apps, if they do not respawn -# - silent_fail exit script without prompt or installation -# - prompt_user show a user dialog for each blocking process found -# abort after three attempts to quit -# (only if user accepts to quit the apps, otherwise -# the update is cancelled). -# - prompt_user_then_kill -# show a user dialog for each blocking process found, -# attempt to quit two times, kill the process finally -# - prompt_user_loop -# Like prompt-user, but clicking "Not Now", will just wait an hour, -# and then it will ask again. -# WARNING! It might block the MDM agent on the machine, as -# the scripts gets stuct in waiting until the hour has passed, -# possibly blocking for other management actions in this time. -# - tell_user User will be showed a notification about the important update, -# but user is only allowed to quit and continue, and then we -# ask the app to quit. -# - tell_user_then_kill -# Show dialog 2 times, and if the quitting fails, the -# blocking processes will be killed. -# - kill kill process without prompting or giving the user a chance to save - - -# logo-icon used in dialog boxes if app is blocking -# LOGO=appstore -# options: -# - appstore Icon is Apple App Store (default) -# - jamf JAMF Pro -# - mosyleb Mosyle Business -# - mosylem Mosyle Manager (Education) -# - addigy Addigy -# path can also be set in the command call, and if file exists, it will be used. -# Like 'LOGO="/System/Applications/App\ Store.app/Contents/Resources/AppIcon.icns"' -# (spaces have to be escaped). - - -# App Store apps handling -# IGNORE_APP_STORE_APPS=no -# options: -# - no If installed app is from App Store (which include VPP installed apps) -# it will not be touched, no matter it's version (default) -# - yes Replace App Store (and VPP) version of app and handle future -# updates using Installomator, even if latest version. -# Shouldn’t give any problems for the user in most cases. -# Known bad example: Slack will loose all settings. - - -# install behavior -# INSTALL="" -# options: -# - When not set, software will only be installed -# if it is newer/different in version -# - force Install even if it’s the same version - - -# Re-opening of closed app -# REOPEN="yes" -# options: -# - yes App wil be reopened if it was closed -# - no App not reopened - - -######################## -# Often used labels: -######################## - -# firefox -# firefox_intl -# brave -# torbrowser -# googlechrome -# netnewswire - -# adobereaderdc -# textmate - -# cyberduck -# keka -# theunarchiver - -# vlc -# handbrake - -# inkscape - -# signal -# telegram -# whatsapp - -# hazel -# devonthink - -# teamviewerqs -# zoom - -# malwarebytes -# githubdesktop -# sublimetext -# textmate -# visualstudiocode - -# microsoftskypeforbusiness -# microsoftteams -# microsoftyammer -# microsoftedgeenterprisestable -# microsoftedgeconsumerstable -# microsoftsharepointplugin -# microsoftdefenderatp - -# googledrivefilestream - -# cdef -# desktoppr -# supportapp -# xink -# wwdc diff --git a/MDM/InstallInstallomator.sh b/MDM/InstallInstallomator.sh deleted file mode 100644 index 9bb131f..0000000 --- a/MDM/InstallInstallomator.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# This script is meant to povide the simplest MDM/management platform agnostic way to install Installomator -# The only requirement is an Internet connection - -export PATH=/usr/bin:/bin:/usr/sbin:/sbin - -# Get the URL of the latest PKG From the Installomator GitHub repo -url=$(curl --silent --fail "https://api.github.com/repos/Installomator/Installomator/releases/latest" | awk -F '"' "/browser_download_url/ && /pkg\"/ { print \$4; exit }") -# Expected Team ID of the downloaded PKG -expectedTeamID="JME5BW3F3R" -exitCode=0 - -# Check for Installomator and install if not found -if [ ! -e "/usr/local/Installomator/Installomator.sh" ]; then - echo "Installomator not found. Installing." - # Create temporary working directory - tempDirectory=$( mktemp -d ) - echo "Created working directory '$tempDirectory'" - # Download the installer package - echo "Downloading Installomator package" - curl --location --silent "$url" -o "$tempDirectory/Installomator.pkg" - # Verify the download - teamID=$(spctl -a -vv -t install "$tempDirectory/Installomator.pkg" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()') - echo "Team ID for downloaded package: $teamID" - # Install the package if Team ID validates - if [ "$expectedTeamID" = "$teamID" ] || [ "$expectedTeamID" = "" ]; then - echo "Package verified. Installing package Installomator.pkg" - installer -pkg "$tempDirectory/Installomator.pkg" -target / -verbose - exitCode=$? - else - echo "Package verification failed before package installation could start. Download link may be invalid. Aborting." - exitCode=1 - exit $exitCode - fi - # Remove the temporary working directory when done - echo "Deleting working directory '$tempDirectory' and its contents" - rm -Rf "$tempDirectory" -else - echo "Installomator already installed." -fi - -exit $exitCode diff --git a/MDM/Installomator update.sh b/MDM/Installomator update.sh deleted file mode 100755 index 5b6bb67..0000000 --- a/MDM/Installomator update.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# Updating Installomator -# Usefull to push out after deployment if earlier version was deployed in DEP profile - -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 & -caffeinatepid=$! -caffexit () { - kill "$caffeinatepid" - pkill caffeinate - exit $1 -} - -# Install software using Installomator -cmdOutput="$(${destFile} ${what} LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent LOGGING=req || 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} -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]" -caffexit 0 diff --git a/MDM/MDMAddigy CustomSoftware.sh b/MDM/MDMAddigy CustomSoftware.sh deleted file mode 100755 index e7918fd..0000000 --- a/MDM/MDMAddigy CustomSoftware.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/zsh - -# Specific settings in Addigy to configure Custom Software for installomator. -# Addigy has 3 parts to fill out for this, Installation script, Condition, and Removal steps (see RemoveInstallomator.sh). - -# 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 (9.1.0)/Installomator-9.1.pkg" -target / - -# Installation using Installomator -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 "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 & -caffeinatepid=$! -caffexit () { - kill "$caffeinatepid" - pkill caffeinate - exit $1 -} - -# Count errors -errorCount=0 - -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 - -echo -echo "Errors: $errorCount" -echo "[$(DATE)][LOG-END]" - -caffexit $errorCount - -# Mark: Conditions -# 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="9.1" - -vercomp () { - if [[ $1 == $2 ]]; then - return 0 - fi - local IFS=. - local i ver1=($1) ver2=($2) - # fill empty fields in ver1 with zeros - for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do - ver1[i]=0 - done - for ((i=0; i<${#ver1[@]}; i++)); do - if [[ -z ${ver2[i]} ]]; then - # fill empty fields in ver2 with zeros - ver2[i]=0 - fi - if ((10#${ver1[i]} > 10#${ver2[i]})); then - return 1 - fi - if ((10#${ver1[i]} < 10#${ver2[i]})); then - return 2 - fi - done - return 0 -} - -INSTALLED_VERSION="$(pkgutil --pkg-info $PKG_ID | grep -i "^version" | awk '{print $2}')" - -echo "Current Version: ${INSTALLED_VERSION}" - -vercomp ${TARGET_VERSION} ${INSTALLED_VERSION} -COMP=$? # 0 means the same, 1 means TARGET is newer, 2 means INSTALLED is newer -echo "COMPARISON: ${COMP}" - -if [ "${COMP}" -eq 1 ]; then - echo "Installed version is older than ${TARGET_VERSION}." - exit 0 -else - echo "Installed version is the same or newer than ${TARGET_VERSION}." - exit 1 -fi diff --git a/MDM/MDMMosyle install.sh b/MDM/MDMMosyle install.sh deleted file mode 100644 index 27f9d8d..0000000 --- a/MDM/MDMMosyle install.sh +++ /dev/null @@ -1,79 +0,0 @@ -PKG_ID="com.scriptingosx.Installomator" -TARGET_VERSION="9.1" -URLDOWNLOAD="%MosyleCDNFile:blah-blah-blah%" -###################################################################### -# 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 - -# No sleeping -/usr/bin/caffeinate -d -i -m -u & -caffeinatepid=$! -caffexit () { - kill "$caffeinatepid" - pkill caffeinate - exit $1 -} - -# Mark: Condition for Installomator installation - -INSTALLED_VERSION="$(pkgutil --pkg-info $PKG_ID 2>/dev/null | grep -i "^version" | awk '{print $2}')" - -echo "Current Version: ${INSTALLED_VERSION}" - -if [[ "$TARGET_VERSION" != "$INSTALLED_VERSION" ]]; then - TMPDIR=$(mktemp -d ) - if ! cd "$TMPDIR"; then - echo "error changing directory $TMPDIR" - caffexit 98 - fi - NAME=$TMPDIR/$(date +%s).pkg - if ! curl -fsL "$URLDOWNLOAD" -o "$NAME"; then - echo "error downloading $URLDOWNLOAD to $NAME." - caffexit 97 - fi - installer -pkg "$NAME" -target / - rm -rf "$TMPDIR" -else - echo "Installomator version $INSTALLED_VERSION already installed!" -fi - - -# Mark: Start Installomator label(s) installation - -# 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 what in $whatList; do - #echo $item - # 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 - -echo -echo "Errors: $errorCount" -echo "[$(DATE)][LOG-END]" - -caffexit $errorCount diff --git a/MDM/Manual valuesfromarguments.sh b/MDM/Manual valuesfromarguments.sh deleted file mode 100755 index ee80291..0000000 --- a/MDM/Manual valuesfromarguments.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# Software - -# Installation using Installomator -# Example of installing software using valuesfromarguments to install a custom software - -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 & -caffeinatepid=$! -caffexit () { - kill "$caffeinatepid" - pkill caffeinate - exit $1 -} - -# 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) - -# 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)" - -# 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]" -caffexit 0 diff --git a/MDM/RemoveInstallomator.sh b/MDM/Remove Installomator.sh similarity index 100% rename from MDM/RemoveInstallomator.sh rename to MDM/Remove Installomator.sh From 909a61fbe3a3fc4111316b06febed28a8b62f836 Mon Sep 17 00:00:00 2001 From: Theile Date: Mon, 19 Sep 2022 21:40:03 +0200 Subject: [PATCH 49/96] Improved icon checks and failovers --- ...=> -Progress 1st swiftDialog condition.sh} | 0 ...Dialog.sh => -Progress 1st swiftDialog.sh} | 0 ... -install swiftDialog direct condition.sh} | 0 ...rect.sh => -install swiftDialog direct.sh} | 0 .../Addigy condition notes.sh | 124 -------- .../App VFA SS github.sh | 83 +++++- .../App VFA SS.sh | 83 +++++- .../App browser-security.sh | 80 +++++- .../App normal SS multi-app.sh | 80 +++++- .../App normal SS.sh | 272 ++++++++++++++++++ .../App service Auto-install.sh} | 90 +++++- MDM/App-install/App service Auto-install.sh | 163 ++--------- 12 files changed, 656 insertions(+), 319 deletions(-) rename MDM/{-Progress 1st Dialog condition.sh => -Progress 1st swiftDialog condition.sh} (100%) rename MDM/{-Progress 1st Dialog.sh => -Progress 1st swiftDialog.sh} (100%) rename MDM/{-install Dialog direct condition.sh => -install swiftDialog direct condition.sh} (100%) rename MDM/{-install Dialog direct.sh => -install swiftDialog direct.sh} (100%) delete mode 100644 MDM/App-install with Dialog and dockutil/Addigy condition notes.sh rename MDM/{App-install with Dialog and dockutil => App-install with swiftDialog and dockutil}/App VFA SS github.sh (72%) rename MDM/{App-install with Dialog and dockutil => App-install with swiftDialog and dockutil}/App VFA SS.sh (67%) rename MDM/{App-install with Dialog and dockutil => App-install with swiftDialog and dockutil}/App browser-security.sh (66%) rename MDM/{App-install with Dialog and dockutil => App-install with swiftDialog and dockutil}/App normal SS multi-app.sh (66%) create mode 100644 MDM/App-install with swiftDialog and dockutil/App normal SS.sh rename MDM/{App-install with Dialog and dockutil/App normal SS.sh => App-install with swiftDialog and dockutil/App service Auto-install.sh} (62%) diff --git a/MDM/-Progress 1st Dialog condition.sh b/MDM/-Progress 1st swiftDialog condition.sh similarity index 100% rename from MDM/-Progress 1st Dialog condition.sh rename to MDM/-Progress 1st swiftDialog condition.sh diff --git a/MDM/-Progress 1st Dialog.sh b/MDM/-Progress 1st swiftDialog.sh similarity index 100% rename from MDM/-Progress 1st Dialog.sh rename to MDM/-Progress 1st swiftDialog.sh diff --git a/MDM/-install Dialog direct condition.sh b/MDM/-install swiftDialog direct condition.sh similarity index 100% rename from MDM/-install Dialog direct condition.sh rename to MDM/-install swiftDialog direct condition.sh diff --git a/MDM/-install Dialog direct.sh b/MDM/-install swiftDialog direct.sh similarity index 100% rename from MDM/-install Dialog direct.sh rename to MDM/-install swiftDialog direct.sh diff --git a/MDM/App-install with Dialog and dockutil/Addigy condition notes.sh b/MDM/App-install with Dialog and dockutil/Addigy condition notes.sh deleted file mode 100644 index 41d5d70..0000000 --- a/MDM/App-install with Dialog and dockutil/Addigy condition notes.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/sh - -# Addigy condition -# These are my notes for how I can extract all the label lines from Installomator.sh, evaluate those, and check if installed version is the latest version. -# This script contains functions from Installomator. -label="googlechromepkg" - -# PATH declaration -export PATH=/usr/bin:/bin:/usr/sbin:/sbin - -# Functions from Installomator -downloadURLFromGit() { # $1 git user name, $2 git repo name - gitusername=${1?:"no git user name"} - gitreponame=${2?:"no git repo name"} - - if [[ $type == "pkgInDmg" ]]; then - filetype="dmg" - elif [[ $type == "pkgInZip" ]]; then - filetype="zip" - else - filetype=$type - fi - - if [ -n "$archiveName" ]; then - downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) - if [[ "$(echo $downloadURL | grep -ioE "https.*$archiveName")" == "" ]]; then - printlog "Trying GitHub API for download URL." - downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") - fi - else - downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1) - if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then - printlog "Trying GitHub API for download URL." - downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") - fi - fi - if [ -z "$downloadURL" ]; then - cleanupAndExit 14 "could not retrieve download URL for $gitusername/$gitreponame" ERROR - else - echo "$downloadURL" - return 0 - fi -} - -versionFromGit() { - # credit: Søren Theilgaard (@theilgaard) - # $1 git user name, $2 git repo name - gitusername=${1?:"no git user name"} - gitreponame=${2?:"no git repo name"} - - #appNewVersion=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | grep tag_name | cut -d '"' -f 4 | sed 's/[^0-9\.]//g') - appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') - if [ -z "$appNewVersion" ]; then - printlog "could not retrieve version number for $gitusername/$gitreponame" WARN - appNewVersion="" - else - echo "$appNewVersion" - return 0 - fi -} - - -# Handling of differences in xpath between Catalina and Big Sur -xpath() { - # the xpath tool changes in Big Sur and now requires the `-e` option - if [[ $(sw_vers -buildVersion) > "20A" ]]; then - /usr/bin/xpath -e $@ - # alternative: switch to xmllint (which is not perl) - #xmllint --xpath $@ - - else - /usr/bin/xpath $@ - fi -} - -# from @Pico: https://macadmins.slack.com/archives/CGXNNJXJ9/p1652222365989229?thread_ts=1651786411.413349&cid=CGXNNJXJ9 -getJSONValue() { - # $1: JSON string OR file path to parse (tested to work with up to 1GB string and 2GB file). - # $2: JSON key path to look up (using dot or bracket notation). - printf '%s' "$1" | /usr/bin/osascript -l 'JavaScript' \ - -e "let json = $.NSString.alloc.initWithDataEncoding($.NSFileHandle.fileHandleWithStandardInput.readDataToEndOfFile$(/usr/bin/uname -r | /usr/bin/awk -F '.' '($1 > 18) { print "AndReturnError(ObjC.wrap())" }'), $.NSUTF8StringEncoding)" \ - -e 'if ($.NSFileManager.defaultManager.fileExistsAtPath(json)) json = $.NSString.stringWithContentsOfFileEncodingError(json, $.NSUTF8StringEncoding, ObjC.wrap())' \ - -e "const value = JSON.parse(json.js)$([ -n "${2%%[.[]*}" ] && echo '.')$2" \ - -e 'if (typeof value === "object") { JSON.stringify(value, null, 4) } else { value }' -} - -# Mark: Script -labelScript=$(grep -E -m 1 -A 30 "^$label"'(\)|\|\\)$' "/usr/local/Installomator/Installomator.sh" | grep -B 30 -m 1 ";;") -echo $labelScript -eval $labelScript -echo $appNewVersion - - - -############################## -printLines=0; while read line; do; if [[ $printLines -eq 1 || "$(echo $line | grep -oE "^googlechromepkg")" != "" ]]; then; printLines=1; echo $line; fi; done < "/usr/local/Installomator/Installomator.sh" - -printLines=0; while read line; do; if [[ $printLines -eq 1 ]]; then; if [[ "$(echo $line | grep ";;")" == "" ]]; then; echo $line; else; printLines=0; fi ; elif [[ "$(echo $line | grep -oE "^googlechromepkg")" != "" ]]; then; printLines=1; fi; done < "/usr/local/Installomator/Installomator.sh" - -labelLines="$(printLines=0; while read line; do; if [[ $printLines -eq 1 ]]; then; if [[ "$(echo $line | grep ";;")" == "" ]]; then; echo $line; else; return; fi ; elif [[ "$(echo $line | grep -oE "^googlechromepkg")" != "" ]]; then; printLines=1; fi; done < "/usr/local/Installomator/Installomator.sh")"; echo $labelLines - -label="googlechromepkg";labelLines="$(printLines=0; while read line; do; if [[ $printLines -eq 1 ]]; then; if [[ "$(echo $line | grep ";;")" == "" ]]; then; echo $line; else; return; fi ; elif [[ "$(echo $line | grep -oE "^$label")" != "" ]]; then; printLines=1; fi; done < "/usr/local/Installomator/Installomator.sh")"; eval $labelLines ; echo $appNewVersion - - -label="googlechromepkg" -labelLines="$(printLines=0 -while read line; do - if [[ $printLines -eq 1 ]]; then - if [[ "$(echo $label | grep ";;")" == "" ]]; then - echo $line - else - return - fi - elif [[ "$(echo $line | grep -oE "^$label")" != "" ]]; then - printLines=1 - fi -done < "/usr/local/Installomator/Installomator.sh")" -eval $labelLines -echo $appNewVersion - - - - - - diff --git a/MDM/App-install with Dialog and dockutil/App VFA SS github.sh b/MDM/App-install with swiftDialog and dockutil/App VFA SS github.sh similarity index 72% rename from MDM/App-install with Dialog and dockutil/App VFA SS github.sh rename to MDM/App-install with swiftDialog and dockutil/App VFA SS github.sh index 7671062..fc983c8 100755 --- a/MDM/App-install with Dialog and dockutil/App VFA SS github.sh +++ b/MDM/App-install with swiftDialog and dockutil/App VFA SS github.sh @@ -81,7 +81,7 @@ dialog_command_file="/var/tmp/dialog.log" dialogApp="/Library/Application Support/Dialog/Dialog.app" dockutil="/usr/local/bin/dockutil" -installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space # Other installomatorOptions: # LOGGING=REQ @@ -105,9 +105,10 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_C # Fill the variable "item" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 10.1 : github-functions added. Improved appIcon handling. Can add the app to Dock using dockutil. -# v. 10 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 10.0.2 : Improved icon checks and failovers +# v. 10.0.1 : github-functions added. Improved appIcon handling. Can add the app to Dock using dockutil. +# v. 10.0 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script @@ -178,7 +179,7 @@ if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." installomatorNotify="NOTIFY=all" else - installomatorNotify="" + installomatorNotify="NOTIFY=silent" # check for Swift Dialog if [[ ! -d $dialogApp ]]; then echo "Cannot find dialog at $dialogApp" @@ -188,8 +189,7 @@ else fi # Configure and display swiftDialog - #itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) - itemName="$name" + itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) if [[ "$itemName" != "#" ]]; then message="Installing ${itemName}…" else @@ -197,6 +197,25 @@ else fi echo "$item $itemName" + #Check icon (expecting beginning with “http” to be web-link and “/” to be disk file) + echo "icon before check: $icon" + if [[ "$(echo ${icon} | grep -iE "^(http|ftp).*")" != "" ]]; then + echo "icon looks to be web-link" + if ! curl -sfL --output /dev/null -r 0-0 "${icon}" ; then + echo "ERROR: Cannot download link. Reset icon." + icon="" + fi + elif [[ "$(echo ${icon} | grep -iE "^\/.*")" != "" ]]; then + echo "icon looks to be a file" + if [[ ! -a "${icon}" ]]; then + echo "ERROR: Cannot find file. Reset icon." + icon="" + fi + else + echo "ERROR: Cannot figure out icon. Reset icon." + icon="" + fi + echo "icon after first check: $icon" # If no icon defined we are trying to search for installed app icon if [[ "$icon" == "" ]]; then appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) @@ -205,12 +224,56 @@ else appIcon="${appIcon}.icns" fi icon="${appPath}/Contents/Resources/${appIcon}" - echo "${icon}" + echo "Icon before file check: ${icon}" if [ ! -f "${icon}" ]; then - icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + # Using LOGO variable to show logo in swiftDialog + case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; + esac + if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + icon="${LOGO_PATH}" fi fi - echo "${icon}" + echo "LOGO: $LOGO" + echo "icon: ${icon}" # display first screen open -a "$dialogApp" --args \ diff --git a/MDM/App-install with Dialog and dockutil/App VFA SS.sh b/MDM/App-install with swiftDialog and dockutil/App VFA SS.sh similarity index 67% rename from MDM/App-install with Dialog and dockutil/App VFA SS.sh rename to MDM/App-install with swiftDialog and dockutil/App VFA SS.sh index a7b84a7..dc7f0de 100755 --- a/MDM/App-install with Dialog and dockutil/App VFA SS.sh +++ b/MDM/App-install with swiftDialog and dockutil/App VFA SS.sh @@ -28,7 +28,7 @@ dialog_command_file="/var/tmp/dialog.log" dialogApp="/Library/Application Support/Dialog/Dialog.app" dockutil="/usr/local/bin/dockutil" -installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space # Other installomatorOptions: # LOGGING=REQ @@ -52,9 +52,10 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_C # Fill the variable "item" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 10.1 : Improved appIcon handling. Can add the app to Dock using dockutil -# v. 10 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 10.0.2 : Improved icon checks and failovers +# v. 10.0.1 : Improved appIcon handling. Can add the app to Dock using dockutil +# v. 10.0 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script @@ -126,7 +127,7 @@ if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." installomatorNotify="NOTIFY=all" else - installomatorNotify="" + installomatorNotify="NOTIFY=silent" # check for Swift Dialog if [[ ! -d $dialogApp ]]; then echo "Cannot find dialog at $dialogApp" @@ -136,8 +137,7 @@ else fi # Configure and display swiftDialog - #itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) - itemName="$name" + itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) if [[ "$itemName" != "#" ]]; then message="Installing ${itemName}…" else @@ -145,6 +145,25 @@ else fi echo "$item $itemName" + #Check icon (expecting beginning with “http” to be web-link and “/” to be disk file) + echo "icon before check: $icon" + if [[ "$(echo ${icon} | grep -iE "^(http|ftp).*")" != "" ]]; then + echo "icon looks to be web-link" + if ! curl -sfL --output /dev/null -r 0-0 "${icon}" ; then + echo "ERROR: Cannot download link. Reset icon." + icon="" + fi + elif [[ "$(echo ${icon} | grep -iE "^\/.*")" != "" ]]; then + echo "icon looks to be a file" + if [[ ! -a "${icon}" ]]; then + echo "ERROR: Cannot find file. Reset icon." + icon="" + fi + else + echo "ERROR: Cannot figure out icon. Reset icon." + icon="" + fi + echo "icon after first check: $icon" # If no icon defined we are trying to search for installed app icon if [[ "$icon" == "" ]]; then appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) @@ -153,12 +172,56 @@ else appIcon="${appIcon}.icns" fi icon="${appPath}/Contents/Resources/${appIcon}" - echo "${icon}" + echo "Icon before file check: ${icon}" if [ ! -f "${icon}" ]; then - icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + # Using LOGO variable to show logo in swiftDialog + case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; + esac + if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + icon="${LOGO_PATH}" fi fi - echo "${icon}" + echo "LOGO: $LOGO" + echo "icon: ${icon}" # display first screen open -a "$dialogApp" --args \ diff --git a/MDM/App-install with Dialog and dockutil/App browser-security.sh b/MDM/App-install with swiftDialog and dockutil/App browser-security.sh similarity index 66% rename from MDM/App-install with Dialog and dockutil/App browser-security.sh rename to MDM/App-install with swiftDialog and dockutil/App browser-security.sh index d9eb405..707acc5 100755 --- a/MDM/App-install with Dialog and dockutil/App browser-security.sh +++ b/MDM/App-install with swiftDialog and dockutil/App browser-security.sh @@ -21,7 +21,7 @@ dialog_command_file="/var/tmp/dialog.log" dialogApp="/Library/Application Support/Dialog/Dialog.app" dockutil="/usr/local/bin/dockutil" -installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space +installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space # Other installomatorOptions: # LOGGING=REQ @@ -45,9 +45,10 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit NOTIFY=silent # Fill the variable "item" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 10.1 : Improved appIcon handling. Can add the app to Dock using dockutil -# v. 10 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 10.0.2 : Improved icon checks and failovers +# v. 10.0.1 : Improved appIcon handling. Can add the app to Dock using dockutil +# v. 10.0 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script @@ -118,7 +119,7 @@ if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." installomatorNotify="NOTIFY=all" else - installomatorNotify="" + installomatorNotify="NOTIFY=silent" # check for Swift Dialog if [[ ! -d $dialogApp ]]; then echo "Cannot find dialog at $dialogApp" @@ -136,6 +137,25 @@ else fi echo "$item $itemName" + #Check icon (expecting beginning with “http” to be web-link and “/” to be disk file) + echo "icon before check: $icon" + if [[ "$(echo ${icon} | grep -iE "^(http|ftp).*")" != "" ]]; then + echo "icon looks to be web-link" + if ! curl -sfL --output /dev/null -r 0-0 "${icon}" ; then + echo "ERROR: Cannot download link. Reset icon." + icon="" + fi + elif [[ "$(echo ${icon} | grep -iE "^\/.*")" != "" ]]; then + echo "icon looks to be a file" + if [[ ! -a "${icon}" ]]; then + echo "ERROR: Cannot find file. Reset icon." + icon="" + fi + else + echo "ERROR: Cannot figure out icon. Reset icon." + icon="" + fi + echo "icon after first check: $icon" # If no icon defined we are trying to search for installed app icon if [[ "$icon" == "" ]]; then appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) @@ -144,12 +164,56 @@ else appIcon="${appIcon}.icns" fi icon="${appPath}/Contents/Resources/${appIcon}" - echo "${icon}" + echo "Icon before file check: ${icon}" if [ ! -f "${icon}" ]; then - icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + # Using LOGO variable to show logo in swiftDialog + case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; + esac + if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + icon="${LOGO_PATH}" fi fi - echo "${icon}" + echo "LOGO: $LOGO" + echo "icon: ${icon}" # display first screen open -a "$dialogApp" --args \ diff --git a/MDM/App-install with Dialog and dockutil/App normal SS multi-app.sh b/MDM/App-install with swiftDialog and dockutil/App normal SS multi-app.sh similarity index 66% rename from MDM/App-install with Dialog and dockutil/App normal SS multi-app.sh rename to MDM/App-install with swiftDialog and dockutil/App normal SS multi-app.sh index 9d3d593..d54c94f 100644 --- a/MDM/App-install with Dialog and dockutil/App normal SS multi-app.sh +++ b/MDM/App-install with swiftDialog and dockutil/App normal SS multi-app.sh @@ -21,7 +21,7 @@ dialog_command_file="/var/tmp/dialog.log" dialogApp="/Library/Application Support/Dialog/Dialog.app" dockutil="/usr/local/bin/dockutil" -installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space # Other installomatorOptions: # LOGGING=REQ @@ -45,9 +45,10 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_C # Fill the variable "item" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 10.1 : Improved appIcon handling. Can add the app to Dock using dockutil -# v. 10 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 10.0.2 : Improved icon checks and failovers +# v. 10.0.1 : Improved appIcon handling. Can add the app to Dock using dockutil +# v. 10.0 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script @@ -118,7 +119,7 @@ if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." installomatorNotify="NOTIFY=all" else - installomatorNotify="" + installomatorNotify="NOTIFY=silent" # check for Swift Dialog if [[ ! -d $dialogApp ]]; then echo "Cannot find dialog at $dialogApp" @@ -136,6 +137,25 @@ else fi echo "$item $itemName" + #Check icon (expecting beginning with “http” to be web-link and “/” to be disk file) + echo "icon before check: $icon" + if [[ "$(echo ${icon} | grep -iE "^(http|ftp).*")" != "" ]]; then + echo "icon looks to be web-link" + if ! curl -sfL --output /dev/null -r 0-0 "${icon}" ; then + echo "ERROR: Cannot download link. Reset icon." + icon="" + fi + elif [[ "$(echo ${icon} | grep -iE "^\/.*")" != "" ]]; then + echo "icon looks to be a file" + if [[ ! -a "${icon}" ]]; then + echo "ERROR: Cannot find file. Reset icon." + icon="" + fi + else + echo "ERROR: Cannot figure out icon. Reset icon." + icon="" + fi + echo "icon after first check: $icon" # If no icon defined we are trying to search for installed app icon if [[ "$icon" == "" ]]; then appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) @@ -144,12 +164,56 @@ else appIcon="${appIcon}.icns" fi icon="${appPath}/Contents/Resources/${appIcon}" - echo "${icon}" + echo "Icon before file check: ${icon}" if [ ! -f "${icon}" ]; then - icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + # Using LOGO variable to show logo in swiftDialog + case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; + esac + if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + icon="${LOGO_PATH}" fi fi - echo "${icon}" + echo "LOGO: $LOGO" + echo "icon: ${icon}" # display first screen open -a "$dialogApp" --args \ diff --git a/MDM/App-install with swiftDialog and dockutil/App normal SS.sh b/MDM/App-install with swiftDialog and dockutil/App normal SS.sh new file mode 100644 index 0000000..2c6a6fc --- /dev/null +++ b/MDM/App-install with swiftDialog and dockutil/App normal SS.sh @@ -0,0 +1,272 @@ +#!/bin/sh + +# Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) + +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +item="cyberduck" # enter the software to install +# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg + +# Dialog icon +icon="https://mosylebusinessweb.blob.core.windows.net/envoit-public/customcommand_icon-envoit_666767b6276ff1f31b1ff9719639cf36f761f29f63f2ff17fc.png" +# icon should be a file system path or an URL to an online PNG, so beginning with either “/” or “http”. +# In Mosyle an URL can be found by copy picture address from a Custom Command icon. + +# dockutil variables +addToDock="0" # with dockutil after installation (0 if not) +appPath="/Applications/Cyberduck.app" + +# Other variables +dialog_command_file="/var/tmp/dialog.log" +dialogApp="/Library/Application Support/Dialog/Dialog.app" +dockutil="/usr/local/bin/dockutil" + +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "item" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 10.0.2 : Improved icon checks and failovers +# v. 10.0.1 : Improved appIcon handling. Can add the app to Dock using dockutil +# v. 10.0 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $item" + +dialogUpdate() { + # $1: dialog command + local dcommand="$1" + + if [[ -n $dialog_command_file ]]; then + echo "$dcommand" >> "$dialog_command_file" + echo "Dialog: $dcommand" + fi +} +checkCmdOutput () { + # $1: cmdOutput + local cmdOutput="$1" + 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 "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" + else + echo "ERROR installing ${item}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" + fi +} + +# Check the currently logged in user +currentUser=$(stat -f "%Su" /dev/console) +if [ -z "$currentUser" ] || [ "$currentUser" = "loginwindow" ] || [ "$currentUser" = "_mbsetupuser" ] || [ "$currentUser" = "root" ]; then + echo "ERROR. Logged in user is $currentUser! Cannot proceed." + exit 97 +fi +# Get the current user's UID for dockutil +uid=$(id -u "$currentUser") +# Find the home folder of the user +userHome="$(dscl . -read /users/${currentUser} NFSHomeDirectory | awk '{print $2}')" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Mark: Installation begins +installomatorVersion="$(${destFile} version | cut -d "." -f1 || true)" + +if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; then + echo "Installomator should be at least version 10 to support Dialog. Installed version $installomatorVersion." + echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." + installomatorNotify="NOTIFY=all" +else + installomatorNotify="NOTIFY=silent" + # check for Swift Dialog + if [[ ! -d $dialogApp ]]; then + echo "Cannot find dialog at $dialogApp" + # Install using Installlomator + cmdOutput="$(${destFile} dialog LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + + # Configure and display swiftDialog + itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) + if [[ "$itemName" != "#" ]]; then + message="Installing ${itemName}…" + else + message="Installing ${item}…" + fi + echo "$item $itemName" + + #Check icon (expecting beginning with “http” to be web-link and “/” to be disk file) + echo "icon before check: $icon" + if [[ "$(echo ${icon} | grep -iE "^(http|ftp).*")" != "" ]]; then + echo "icon looks to be web-link" + if ! curl -sfL --output /dev/null -r 0-0 "${icon}" ; then + echo "ERROR: Cannot download link. Reset icon." + icon="" + fi + elif [[ "$(echo ${icon} | grep -iE "^\/.*")" != "" ]]; then + echo "icon looks to be a file" + if [[ ! -a "${icon}" ]]; then + echo "ERROR: Cannot find file. Reset icon." + icon="" + fi + else + echo "ERROR: Cannot figure out icon. Reset icon." + icon="" + fi + echo "icon after first check: $icon" + # If no icon defined we are trying to search for installed app icon + if [[ "$icon" == "" ]]; then + appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) + appIcon=$(defaults read "${appPath}/Contents/Info.plist" CFBundleIconFile || true) + if [[ "$(echo "$appIcon" | grep -io ".icns")" == "" ]]; then + appIcon="${appIcon}.icns" + fi + icon="${appPath}/Contents/Resources/${appIcon}" + echo "Icon before file check: ${icon}" + if [ ! -f "${icon}" ]; then + # Using LOGO variable to show logo in swiftDialog + case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; + esac + if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + icon="${LOGO_PATH}" + fi + fi + echo "LOGO: $LOGO" + echo "icon: ${icon}" + + # display first screen + open -a "$dialogApp" --args \ + --title none \ + --icon "$icon" \ + --message "$message" \ + --mini \ + --progress 100 \ + --position bottomright \ + --movable \ + --commandfile "$dialog_command_file" + + # give everything a moment to catch up + sleep 0.1 +fi + +# Install software using Installomator +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} ${installomatorNotify} || true)" +checkCmdOutput $cmdOutput + +# Mark: dockutil stuff +if [[ $addToDock -eq 1 ]]; then + dialogUpdate "progresstext: Adding to Dock" + if [[ ! -d $dockutil ]]; then + echo "Cannot find dockutil at $dockutil, trying installation" + # Install using Installlomator + cmdOutput="$(${destFile} dockutil LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" + checkCmdOutput $cmdOutput + fi + echo "Adding to Dock" + $dockutil --add "${appPath}" "${userHome}/Library/Preferences/com.apple.dock.plist" || true + sleep 1 +else + echo "Not adding to Dock." +fi + +# Mark: Ending +if [[ $installomatorVersion -lt 10 ]]; then + echo "Again skipping Dialog stuff." +else + # close and quit dialog + dialogUpdate "progress: complete" + dialogUpdate "progresstext: Done" + + # pause a moment + sleep 0.5 + + dialogUpdate "quit:" + + # let everything catch up + sleep 0.5 + + # just to be safe + #killall "Dialog" 2>/dev/null || true +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus diff --git a/MDM/App-install with Dialog and dockutil/App normal SS.sh b/MDM/App-install with swiftDialog and dockutil/App service Auto-install.sh similarity index 62% rename from MDM/App-install with Dialog and dockutil/App normal SS.sh rename to MDM/App-install with swiftDialog and dockutil/App service Auto-install.sh index 7326f4a..2748c0f 100644 --- a/MDM/App-install with Dialog and dockutil/App normal SS.sh +++ b/MDM/App-install with swiftDialog and dockutil/App service Auto-install.sh @@ -1,11 +1,11 @@ #!/bin/sh -# Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) +# Installation using Installomator -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="addigy" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -item="" # enter the software to install -# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg +item="xink" # enter the software to install +# Examples: desktoppr, dockutil, supportapp, applenyfonts, applesfpro, applesfmono, applesfcompact, nomad, nudge, shield, xink # Dialog icon icon="" @@ -14,14 +14,14 @@ icon="" # dockutil variables addToDock="1" # with dockutil after installation (0 if not) -appPath="/Applications/.app" +appPath="/Applications/Xink.app" # Other variables dialog_command_file="/var/tmp/dialog.log" dialogApp="/Library/Application Support/Dialog/Dialog.app" dockutil="/usr/local/bin/dockutil" -installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space +installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space # Other installomatorOptions: # LOGGING=REQ @@ -45,9 +45,10 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=silent DIALOG_C # Fill the variable "item" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 10.1 : Improved appIcon handling. Can add the app to Dock using dockutil -# v. 10 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 10.0.2 : Improved icon checks and failovers +# v. 10.0.1 : Can add the app to Dock using dockutil +# v. 10.0 : Integration with Dialog and Installomator v. 10 +# v. 9.3 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script @@ -118,7 +119,7 @@ if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." installomatorNotify="NOTIFY=all" else - installomatorNotify="" + installomatorNotify="NOTIFY=silent" # check for Swift Dialog if [[ ! -d $dialogApp ]]; then echo "Cannot find dialog at $dialogApp" @@ -136,6 +137,25 @@ else fi echo "$item $itemName" + #Check icon (expecting beginning with “http” to be web-link and “/” to be disk file) + echo "icon before check: $icon" + if [[ "$(echo ${icon} | grep -iE "^(http|ftp).*")" != "" ]]; then + echo "icon looks to be web-link" + if ! curl -sfL --output /dev/null -r 0-0 "${icon}" ; then + echo "ERROR: Cannot download link. Reset icon." + icon="" + fi + elif [[ "$(echo ${icon} | grep -iE "^\/.*")" != "" ]]; then + echo "icon looks to be a file" + if [[ ! -a "${icon}" ]]; then + echo "ERROR: Cannot find file. Reset icon." + icon="" + fi + else + echo "ERROR: Cannot figure out icon. Reset icon." + icon="" + fi + echo "icon after first check: $icon" # If no icon defined we are trying to search for installed app icon if [[ "$icon" == "" ]]; then appPath=$(mdfind "kind:application AND name:$itemName" | head -1 || true) @@ -144,12 +164,56 @@ else appIcon="${appIcon}.icns" fi icon="${appPath}/Contents/Resources/${appIcon}" - echo "${icon}" + echo "Icon before file check: ${icon}" if [ ! -f "${icon}" ]; then - icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + # Using LOGO variable to show logo in swiftDialog + case $LOGO in + appstore) + # Apple App Store on Mac + if [[ $(sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + ;; + jamf) + # Jamf Pro + LOGO_PATH="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns" + ;; + mosyleb) + # Mosyle Business + LOGO_PATH="/Applications/Self-Service.app/Contents/Resources/AppIcon.icns" + ;; + mosylem) + # Mosyle Manager (education) + LOGO_PATH="/Applications/Manager.app/Contents/Resources/AppIcon.icns" + ;; + addigy) + # Addigy + LOGO_PATH="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns" + ;; + microsoft) + # Microsoft Endpoint Manager (Intune) + LOGO_PATH="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" + ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + ;; + esac + if [[ ! -a "${LOGO_PATH}" ]]; then + printlog "ERROR in LOGO_PATH '${LOGO_PATH}', setting Mac App Store." + if [[ $(/usr/bin/sw_vers -buildVersion) > "19" ]]; then + LOGO_PATH="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" + else + LOGO_PATH="/Applications/App Store.app/Contents/Resources/AppIcon.icns" + fi + fi + icon="${LOGO_PATH}" fi fi - echo "${icon}" + echo "LOGO: $LOGO" + echo "icon: ${icon}" # display first screen open -a "$dialogApp" --args \ diff --git a/MDM/App-install/App service Auto-install.sh b/MDM/App-install/App service Auto-install.sh index 8e0509a..5b56685 100644 --- a/MDM/App-install/App service Auto-install.sh +++ b/MDM/App-install/App service Auto-install.sh @@ -2,26 +2,12 @@ # Installation using Installomator -LOGO="addigy" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -item="xink" # enter the software to install -# Examples: desktoppr, dockutil, supportapp, applenyfonts, applesfpro, applesfmono, applesfcompact, nomad, nudge, shield, xink +what="dockutil" # enter the software to install +# Examples: adobecreativeclouddesktop, textmate, vlc -# Dialog icon -icon="" -# icon should be a file system path or an URL to an online PNG. -# In Mosyle an URL can be found by copy picture address from a Custom Command icon. - -# dockutil variables -addToDock="1" # with dockutil after installation (0 if not) -appPath="/Applications/Xink.app" - -# Other variables -dialog_command_file="/var/tmp/dialog.log" -dialogApp="/Library/Application Support/Dialog/Dialog.app" -dockutil="/usr/local/bin/dockutil" - -installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent DIALOG_CMD_FILE=${dialog_command_file}" # Separated by space +installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated by space # Other installomatorOptions: # LOGGING=REQ @@ -42,11 +28,9 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent DIALOG_CMD_FI # INSTALL=force ###################################################################### # To be used as a script sent out from a MDM. -# Fill the variable "item" above with a label. +# Fill the variable "what" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 10.1 : Can add the app to Dock using dockutil -# v. 10 : Integration with Dialog and Installomator v. 10 # v. 9.3 : Better logging handling and installomatorOptions fix. ###################################################################### @@ -54,43 +38,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent DIALOG_CMD_FI # PATH declaration export PATH=/usr/bin:/bin:/usr/sbin:/sbin -echo "$(date +%F\ %T) [LOG-BEGIN] $item" - -dialogUpdate() { - # $1: dialog command - local dcommand="$1" - - if [[ -n $dialog_command_file ]]; then - echo "$dcommand" >> "$dialog_command_file" - echo "Dialog: $dcommand" - fi -} -checkCmdOutput () { - # $1: cmdOutput - local cmdOutput="$1" - 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 "${item} succesfully installed." - warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" - echo "$warnOutput" - else - echo "ERROR installing ${item}. Exit code ${exitStatus}" - echo "$cmdOutput" - #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" - #echo "$errorOutput" - fi -} - -# Check the currently logged in user -currentUser=$(stat -f "%Su" /dev/console) -if [ -z "$currentUser" ] || [ "$currentUser" = "loginwindow" ] || [ "$currentUser" = "_mbsetupuser" ] || [ "$currentUser" = "root" ]; then - echo "ERROR. Logged in user is $currentUser! Cannot proceed." - exit 97 -fi -# Get the current user's UID for dockutil -uid=$(id -u "$currentUser") -# Find the home folder of the user -userHome="$(dscl . -read /users/${currentUser} NFSHomeDirectory | awk '{print $2}')" +echo "$(date +%F\ %T) [LOG-BEGIN] $what" # Verify that Installomator has been installed destFile="/usr/local/Installomator/Installomator.sh" @@ -110,97 +58,20 @@ caffexit () { exit $1 } -# Mark: Installation begins -installomatorVersion="$(${destFile} version | cut -d "." -f1 || true)" - -if [[ $installomatorVersion -lt 10 ]] || [[ $(sw_vers -buildVersion) < "20A" ]]; then - echo "Installomator should be at least version 10 to support Dialog. Installed version $installomatorVersion." - echo "And macOS 11 Big Sur (build 20A) is required for Dialog. Installed build $(sw_vers -buildVersion)." - installomatorNotify="NOTIFY=all" -else - installomatorNotify="" - # check for Swift Dialog - if [[ ! -d $dialogApp ]]; then - echo "Cannot find dialog at $dialogApp" - # Install using Installlomator - cmdOutput="$(${destFile} dialog LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" - checkCmdOutput $cmdOutput - fi - - # Configure and display swiftDialog - itemName=$( ${destFile} ${item} RETURN_LABEL_NAME=1 LOGGING=REQ INSTALL=force | tail -1 || true ) - if [[ "$itemName" != "#" ]]; then - message="Installing ${itemName}…" - else - message="Installing ${item}…" - fi - echo "$item $itemName" - - # If no icon defined we are trying to search for installed app icon - if [[ "$icon" == "" ]]; then - appPath=$(mdfind "kind:application AND name:$itemName" | head -1) - appIcon=$(defaults read "${appPath}/Contents/Info.plist" CFBundleIconFile) - icon="${appPath}/Contents/Resources/${appIcon}" - echo "${icon}" - if [ ! -f "${icon}" ]; then - icon="/System/Applications/App Store.app/Contents/Resources/AppIcon.icns" - fi - fi - echo "${icon}" - - # display first screen - open -a "$dialogApp" --args \ - --title none \ - --icon "$icon" \ - --message "$message" \ - --mini \ - --progress 100 \ - --position bottomright \ - --movable \ - --commandfile "$dialog_command_file" - - # give everything a moment to catch up - sleep 0.1 -fi - # Install software using Installomator -cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} ${installomatorNotify} || true)" -checkCmdOutput $cmdOutput +cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || true)" -# Mark: dockutil stuff -if [[ $addToDock -eq 1 ]]; then - dialogUpdate "progresstext: Adding to Dock" - if [[ ! -d $dockutil ]]; then - echo "Cannot find dockutil at $dockutil, trying installation" - # Install using Installlomator - cmdOutput="$(${destFile} dockutil LOGO=$LOGO BLOCKING_PROCESS_ACTION=ignore LOGGING=REQ NOTIFY=silent || true)" - checkCmdOutput $cmdOutput - fi - echo "Adding to Dock" - $dockutil --add "${appPath}" "${userHome}/Library/Preferences/com.apple.dock.plist" || true - sleep 1 +# 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 "${what} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" else - echo "Not adding to Dock." -fi - -# Mark: Ending -if [[ $installomatorVersion -lt 10 ]]; then - echo "Again skipping Dialog stuff." -else - # close and quit dialog - dialogUpdate "progress: complete" - dialogUpdate "progresstext: Done" - - # pause a moment - sleep 0.5 - - dialogUpdate "quit:" - - # let everything catch up - sleep 0.5 - - # just to be safe - #killall "Dialog" 2>/dev/null || true + echo "ERROR installing ${what}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" fi echo "[$(DATE)][LOG-END]" From c0a850848b6b4ee876d4f073f2b89b6a4f979892 Mon Sep 17 00:00:00 2001 From: Theile Date: Tue, 20 Sep 2022 08:36:55 +0200 Subject: [PATCH 50/96] Version number matching --- .../App VFA SS github.sh | 2 +- .../App VFA SS.sh | 2 +- .../App browser-security SS.sh} | 2 +- .../App normal SS multi-app.sh | 2 +- .../App normal SS.sh | 2 +- .../App service SS.sh} | 2 +- MDM/App-install/App VFA.sh | 2 +- MDM/App-install/App browser-security Auto-install.sh | 2 +- MDM/App-install/App browser-security SS.sh | 2 +- MDM/App-install/App normal Auto-install.sh | 2 +- MDM/App-install/App normal SS.sh | 2 +- MDM/App-install/App service Auto-install.sh | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) rename MDM/{App-install with swiftDialog and dockutil => App-install SS with swiftDialog and dockutil}/App VFA SS github.sh (99%) rename MDM/{App-install with swiftDialog and dockutil => App-install SS with swiftDialog and dockutil}/App VFA SS.sh (99%) rename MDM/{App-install with swiftDialog and dockutil/App browser-security.sh => App-install SS with swiftDialog and dockutil/App browser-security SS.sh} (99%) rename MDM/{App-install with swiftDialog and dockutil => App-install SS with swiftDialog and dockutil}/App normal SS multi-app.sh (99%) rename MDM/{App-install with swiftDialog and dockutil => App-install SS with swiftDialog and dockutil}/App normal SS.sh (99%) rename MDM/{App-install with swiftDialog and dockutil/App service Auto-install.sh => App-install SS with swiftDialog and dockutil/App service SS.sh} (99%) diff --git a/MDM/App-install with swiftDialog and dockutil/App VFA SS github.sh b/MDM/App-install SS with swiftDialog and dockutil/App VFA SS github.sh similarity index 99% rename from MDM/App-install with swiftDialog and dockutil/App VFA SS github.sh rename to MDM/App-install SS with swiftDialog and dockutil/App VFA SS github.sh index fc983c8..8d9365d 100755 --- a/MDM/App-install with swiftDialog and dockutil/App VFA SS github.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App VFA SS github.sh @@ -108,7 +108,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user DIALOG_CMD_FILE=${dial # v. 10.0.2 : Improved icon checks and failovers # v. 10.0.1 : github-functions added. Improved appIcon handling. Can add the app to Dock using dockutil. # v. 10.0 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install with swiftDialog and dockutil/App VFA SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh similarity index 99% rename from MDM/App-install with swiftDialog and dockutil/App VFA SS.sh rename to MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh index dc7f0de..31cf097 100755 --- a/MDM/App-install with swiftDialog and dockutil/App VFA SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh @@ -55,7 +55,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user DIALOG_CMD_FILE=${dial # v. 10.0.2 : Improved icon checks and failovers # v. 10.0.1 : Improved appIcon handling. Can add the app to Dock using dockutil # v. 10.0 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install with swiftDialog and dockutil/App browser-security.sh b/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh similarity index 99% rename from MDM/App-install with swiftDialog and dockutil/App browser-security.sh rename to MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh index 707acc5..7573f1f 100755 --- a/MDM/App-install with swiftDialog and dockutil/App browser-security.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh @@ -48,7 +48,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit DIALOG_CMD_FIL # v. 10.0.2 : Improved icon checks and failovers # v. 10.0.1 : Improved appIcon handling. Can add the app to Dock using dockutil # v. 10.0 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install with swiftDialog and dockutil/App normal SS multi-app.sh b/MDM/App-install SS with swiftDialog and dockutil/App normal SS multi-app.sh similarity index 99% rename from MDM/App-install with swiftDialog and dockutil/App normal SS multi-app.sh rename to MDM/App-install SS with swiftDialog and dockutil/App normal SS multi-app.sh index d54c94f..71eba78 100644 --- a/MDM/App-install with swiftDialog and dockutil/App normal SS multi-app.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App normal SS multi-app.sh @@ -48,7 +48,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user DIALOG_CMD_FILE=${dial # v. 10.0.2 : Improved icon checks and failovers # v. 10.0.1 : Improved appIcon handling. Can add the app to Dock using dockutil # v. 10.0 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install with swiftDialog and dockutil/App normal SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh similarity index 99% rename from MDM/App-install with swiftDialog and dockutil/App normal SS.sh rename to MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh index 2c6a6fc..97e4398 100644 --- a/MDM/App-install with swiftDialog and dockutil/App normal SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh @@ -45,7 +45,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user DIALOG_CMD_FILE=${dial # v. 10.0.2 : Improved icon checks and failovers # v. 10.0.1 : Improved appIcon handling. Can add the app to Dock using dockutil # v. 10.0 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install with swiftDialog and dockutil/App service Auto-install.sh b/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh similarity index 99% rename from MDM/App-install with swiftDialog and dockutil/App service Auto-install.sh rename to MDM/App-install SS with swiftDialog and dockutil/App service SS.sh index 2748c0f..ee1daa0 100644 --- a/MDM/App-install with swiftDialog and dockutil/App service Auto-install.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh @@ -48,7 +48,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent DIALOG_CMD_FI # v. 10.0.2 : Improved icon checks and failovers # v. 10.0.1 : Can add the app to Dock using dockutil # v. 10.0 : Integration with Dialog and Installomator v. 10 -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install/App VFA.sh b/MDM/App-install/App VFA.sh index 19240cd..1772419 100755 --- a/MDM/App-install/App VFA.sh +++ b/MDM/App-install/App VFA.sh @@ -38,7 +38,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user LOGGING=INFO NOTIFY=al # Fill the variable "what" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install/App browser-security Auto-install.sh b/MDM/App-install/App browser-security Auto-install.sh index dfd0ada..45a52af 100644 --- a/MDM/App-install/App browser-security Auto-install.sh +++ b/MDM/App-install/App browser-security Auto-install.sh @@ -31,7 +31,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated b # Fill the variable "what" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install/App browser-security SS.sh b/MDM/App-install/App browser-security SS.sh index 829ae5a..75d55f2 100644 --- a/MDM/App-install/App browser-security SS.sh +++ b/MDM/App-install/App browser-security SS.sh @@ -31,7 +31,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit NOTIFY=all" # # Fill the variable "what" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install/App normal Auto-install.sh b/MDM/App-install/App normal Auto-install.sh index aa7d624..a43cdff 100644 --- a/MDM/App-install/App normal Auto-install.sh +++ b/MDM/App-install/App normal Auto-install.sh @@ -31,7 +31,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user" # Separated by space # Fill the variable "what" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install/App normal SS.sh b/MDM/App-install/App normal SS.sh index 98aa7c1..5481991 100644 --- a/MDM/App-install/App normal SS.sh +++ b/MDM/App-install/App normal SS.sh @@ -31,7 +31,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=all" # Separate # Fill the variable "what" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script diff --git a/MDM/App-install/App service Auto-install.sh b/MDM/App-install/App service Auto-install.sh index 5b56685..0f5b5f1 100644 --- a/MDM/App-install/App service Auto-install.sh +++ b/MDM/App-install/App service Auto-install.sh @@ -31,7 +31,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated # Fill the variable "what" above with a label. # Script will run this label through Installomator. ###################################################################### -# v. 9.3 : Better logging handling and installomatorOptions fix. +# v. 9.2.1 : Better logging handling and installomatorOptions fix. ###################################################################### # Mark: Script From 938a40943eceff1cc36a326c88f91dfe89051cca Mon Sep 17 00:00:00 2001 From: Theile Date: Tue, 20 Sep 2022 09:50:54 +0200 Subject: [PATCH 51/96] Cleaning and adding prevention scripts --- ... => Installomator 1st Auto-install DEPNotify.sh} | 2 +- ...tor 1st.sh => Installomator 1st Auto-install.sh} | 2 +- ...PNotify.sh => Installomator 1st SS DEPNotify.sh} | 2 +- ...tallomator 1st SS.sh => Installomator 1st SS.sh} | 13 ++++++++----- ...ion Addigy.sh => Installomator 1st condition.sh} | 0 MDM/Installomator 1st prevention.sh | 11 +++++++++++ ...ion.sh => Progress 1st swiftDialog condition.sh} | 2 +- MDM/Progress 1st swiftDialog prevention.sh | 11 +++++++++++ ...t swiftDialog.sh => Progress 1st swiftDialog.sh} | 4 ++-- ...sh => install Installomator direct condition.sh} | 3 +++ ...or direct.sh => install Installomator direct.sh} | 0 ...n.sh => install swiftDialog direct condition.sh} | 3 +++ ...alog direct.sh => install swiftDialog direct.sh} | 0 13 files changed, 42 insertions(+), 11 deletions(-) rename MDM/{-Installomator 1st -DEPNotify.sh => Installomator 1st Auto-install DEPNotify.sh} (99%) rename MDM/{-Installomator 1st.sh => Installomator 1st Auto-install.sh} (99%) rename MDM/{-Installomator 1st SS DEPNotify.sh => Installomator 1st SS DEPNotify.sh} (99%) rename MDM/{-Installomator 1st SS.sh => Installomator 1st SS.sh} (95%) rename MDM/{-Installomator 1st condition Addigy.sh => Installomator 1st condition.sh} (100%) create mode 100644 MDM/Installomator 1st prevention.sh rename MDM/{-Progress 1st swiftDialog condition.sh => Progress 1st swiftDialog condition.sh} (81%) create mode 100644 MDM/Progress 1st swiftDialog prevention.sh rename MDM/{-Progress 1st swiftDialog.sh => Progress 1st swiftDialog.sh} (99%) rename MDM/{-install Installomator direct condition.sh => install Installomator direct condition.sh} (90%) rename MDM/{-install Installomator direct.sh => install Installomator direct.sh} (100%) rename MDM/{-install swiftDialog direct condition.sh => install swiftDialog direct condition.sh} (92%) rename MDM/{-install swiftDialog direct.sh => install swiftDialog direct.sh} (100%) diff --git a/MDM/-Installomator 1st -DEPNotify.sh b/MDM/Installomator 1st Auto-install DEPNotify.sh similarity index 99% rename from MDM/-Installomator 1st -DEPNotify.sh rename to MDM/Installomator 1st Auto-install DEPNotify.sh index 9df84a0..18db8d8 100755 --- a/MDM/-Installomator 1st -DEPNotify.sh +++ b/MDM/Installomator 1st Auto-install DEPNotify.sh @@ -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" diff --git a/MDM/-Installomator 1st.sh b/MDM/Installomator 1st Auto-install.sh similarity index 99% rename from MDM/-Installomator 1st.sh rename to MDM/Installomator 1st Auto-install.sh index 744f5c3..46c2188 100755 --- a/MDM/-Installomator 1st.sh +++ b/MDM/Installomator 1st Auto-install.sh @@ -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" diff --git a/MDM/-Installomator 1st SS DEPNotify.sh b/MDM/Installomator 1st SS DEPNotify.sh similarity index 99% rename from MDM/-Installomator 1st SS DEPNotify.sh rename to MDM/Installomator 1st SS DEPNotify.sh index b960734..eec89df 100755 --- a/MDM/-Installomator 1st SS DEPNotify.sh +++ b/MDM/Installomator 1st SS DEPNotify.sh @@ -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" diff --git a/MDM/-Installomator 1st SS.sh b/MDM/Installomator 1st SS.sh similarity index 95% rename from MDM/-Installomator 1st SS.sh rename to MDM/Installomator 1st SS.sh index 9efa824..9654f76 100755 --- a/MDM/-Installomator 1st SS.sh +++ b/MDM/Installomator 1st SS.sh @@ -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 diff --git a/MDM/-Installomator 1st condition Addigy.sh b/MDM/Installomator 1st condition.sh similarity index 100% rename from MDM/-Installomator 1st condition Addigy.sh rename to MDM/Installomator 1st condition.sh diff --git a/MDM/Installomator 1st prevention.sh b/MDM/Installomator 1st prevention.sh new file mode 100644 index 0000000..b4658d9 --- /dev/null +++ b/MDM/Installomator 1st prevention.sh @@ -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" diff --git a/MDM/-Progress 1st swiftDialog condition.sh b/MDM/Progress 1st swiftDialog condition.sh similarity index 81% rename from MDM/-Progress 1st swiftDialog condition.sh rename to MDM/Progress 1st swiftDialog condition.sh index 6f91d6d..63d0055 100644 --- a/MDM/-Progress 1st swiftDialog condition.sh +++ b/MDM/Progress 1st swiftDialog condition.sh @@ -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 diff --git a/MDM/Progress 1st swiftDialog prevention.sh b/MDM/Progress 1st swiftDialog prevention.sh new file mode 100644 index 0000000..bd43e56 --- /dev/null +++ b/MDM/Progress 1st swiftDialog prevention.sh @@ -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" diff --git a/MDM/-Progress 1st swiftDialog.sh b/MDM/Progress 1st swiftDialog.sh similarity index 99% rename from MDM/-Progress 1st swiftDialog.sh rename to MDM/Progress 1st swiftDialog.sh index dfb9980..c7315af 100755 --- a/MDM/-Progress 1st swiftDialog.sh +++ b/MDM/Progress 1st swiftDialog.sh @@ -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" diff --git a/MDM/-install Installomator direct condition.sh b/MDM/install Installomator direct condition.sh similarity index 90% rename from MDM/-install Installomator direct condition.sh rename to MDM/install Installomator direct condition.sh index 89cdda6..342e72d 100755 --- a/MDM/-install Installomator direct condition.sh +++ b/MDM/install Installomator direct condition.sh @@ -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') diff --git a/MDM/-install Installomator direct.sh b/MDM/install Installomator direct.sh similarity index 100% rename from MDM/-install Installomator direct.sh rename to MDM/install Installomator direct.sh diff --git a/MDM/-install swiftDialog direct condition.sh b/MDM/install swiftDialog direct condition.sh similarity index 92% rename from MDM/-install swiftDialog direct condition.sh rename to MDM/install swiftDialog direct condition.sh index 2d25e09..79adc19 100755 --- a/MDM/-install swiftDialog direct condition.sh +++ b/MDM/install swiftDialog direct condition.sh @@ -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') diff --git a/MDM/-install swiftDialog direct.sh b/MDM/install swiftDialog direct.sh similarity index 100% rename from MDM/-install swiftDialog direct.sh rename to MDM/install swiftDialog direct.sh From e6088a2edae361dacf077eec7705c8aa3a869212 Mon Sep 17 00:00:00 2001 From: Theile Date: Tue, 20 Sep 2022 16:34:12 +0200 Subject: [PATCH 52/96] Install swiftDialog in preparation script --- MDM/Jamf/00_PrepareInstall_SwiftDialog.sh | 159 ++++++++++++++++++++++ MDM/install Installomator direct.sh | 2 +- 2 files changed, 160 insertions(+), 1 deletion(-) create mode 100755 MDM/Jamf/00_PrepareInstall_SwiftDialog.sh diff --git a/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh b/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh new file mode 100755 index 0000000..425a157 --- /dev/null +++ b/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh @@ -0,0 +1,159 @@ +#!/bin/zsh + +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# MARK: Arguments/Parameters + +# Parameter 4: path to the swiftDialog command file +dialog_command_file=${4:-"/var/tmp/dialog.log"} + +# Parameter 5: message displayed over the progress bar +message=${5:-"Self Service Progress"} + +# Parameter 6: path or URL to an icon +icon=${6:-"/System/Applications/App Store.app/Contents/Resources/AppIcon.icns"} +# see Dan Snelson's advice on how to get a URL to an icon in Self Service +# https://rumble.com/v119x6y-harvesting-self-service-icons.html + +# MARK: Constants + +dialogApp="/Library/Application Support/Dialog/Dialog.app" + +# MARK: Functions + +dialogUpdate() { + # $1: dialog command + local dcommand="$1" + + if [[ -n $dialog_command_file ]]; then + echo "$dcommand" >> "$dialog_command_file" + echo "Dialog: $dcommand" + fi +} + +# MARK: sanity checks + +# check minimal macOS requirement +if [[ $(sw_vers -buildVersion ) < "20A" ]]; then + echo "This script requires at least macOS 11 Big Sur." + exit 98 +fi + +# check we are running as root +if [[ $DEBUG -eq 0 && $(id -u) -ne 0 ]]; then + echo "This script should be run as root" + exit 97 +fi + +# swiftDialog installation +name="Dialog" +printlog "$name check for installation" +# download URL, version and Expected Team ID +# Method for GitHub pkg w. app version check +gitusername="bartreardon" +gitreponame="swiftDialog" +#printlog "$gitusername $gitreponame" +filetype="pkg" +downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "Trying GitHub API for download URL." + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") +fi +#printlog "$downloadURL" +appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') +#printlog "$appNewVersion" +expectedTeamID="PWA5E9TQ59" +destFile="/Library/Application Support/Dialog/Dialog.app" +versionKey="CFBundleShortVersionString" #CFBundleVersion + +currentInstalledVersion="$(defaults read "${destFile}/Contents/Info.plist" $versionKey || true)" +printlog "${name} version: $currentInstalledVersion" +if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then + printlog "$name not found or version not latest." + printlog "${destFile}" + printlog "Installing version ${appNewVersion}…" + # Create temporary working directory + tmpDir="$(mktemp -d || true)" + printlog "Created working directory '$tmpDir'" + # Download the installer package + printlog "Downloading $name package version $appNewVersion from: $downloadURL" + installationCount=0 + exitCode=9 + while [[ $installationCount -lt 3 && $exitCode -gt 0 ]]; do + curlDownload=$(curl -Ls "$downloadURL" -o "$tmpDir/$name.pkg" || true) + curlDownloadStatus=$(echo $?) + if [[ $curlDownloadStatus -ne 0 ]]; then + printlog "error downloading $downloadURL, with status $curlDownloadStatus" + printlog "${curlDownload}" + exitCode=1 + else + printlog "Download $name succes." + # Verify the download + teamID=$(spctl -a -vv -t install "$tmpDir/$name.pkg" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' || true) + printlog "Team ID for downloaded package: $teamID" + # Install the package if Team ID validates + if [ "$expectedTeamID" = "$teamID" ] || [ "$expectedTeamID" = "" ]; then + printlog "$name package verified. Installing package '$tmpDir/$name.pkg'." + pkgInstall=$(installer -verbose -dumplog -pkg "$tmpDir/$name.pkg" -target "/" 2>&1) + pkgInstallStatus=$(echo $?) + if [[ $pkgInstallStatus -ne 0 ]]; then + printlog "ERROR. $name package installation failed." + printlog "${pkgInstall}" + exitCode=2 + else + printlog "Installing $name package succes." + exitCode=0 + fi + else + printlog "ERROR. Package verification failed for $name before package installation could start. Download link may be invalid." + exitCode=3 + fi + fi + ((installationCount++)) + printlog "$installationCount time(s), exitCode $exitCode" + if [[ $installationCount -lt 3 ]]; then + if [[ $exitCode -gt 0 ]]; then + printlog "Sleep a bit before trying download and install again. $installationCount time(s)." + printlog "Remove $(rm -fv "$tmpDir/$name.pkg" || true)" + sleep 2 + fi + else + printlog "Download and install of $name succes." + fi + done + # Remove the temporary working directory + printlog "Deleting working directory '$tmpDir' and its contents." + printlog "Remove $(rm -Rfv "${tmpDir}" || true)" + # Handle installation errors + if [[ $exitCode != 0 ]]; then + printlog "ERROR. Installation of $name failed. Aborting." + caffexit $exitCode + else + printlog "$name version $appNewVersion installed!" + fi +else + printlog "$name version $appNewVersion already found. Perfect!" +fi + +# check for Swift Dialog +if [[ ! -d $dialogApp ]]; then + echo "Cannot find dialog at $dialogApp" + exit 95 +fi + + +# MARK: Configure and display swiftDialog + +# display first screen +open -a "$dialogApp" --args \ + --title none \ + --icon "$icon" \ + --message "$message" \ + --mini \ + --progress 100 \ + --position bottomright \ + --movable \ + --commandfile "$dialog_command_file" + +# give everything a moment to catch up +sleep 0.1 diff --git a/MDM/install Installomator direct.sh b/MDM/install Installomator direct.sh index b822e34..ee7fbcf 100755 --- a/MDM/install Installomator direct.sh +++ b/MDM/install Installomator direct.sh @@ -59,7 +59,7 @@ caffexit () { name="Installomator" printlog "$name check for installation" # download URL, version and Expected Team ID -# Method for GitHub pkg +# Method for GitHub pkg with destFile gitusername="Installomator" gitreponame="Installomator" #printlog "$gitusername $gitreponame" From 5b39697bf829b5142597462b047d29e68ec86002 Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 21 Sep 2022 08:43:31 +0200 Subject: [PATCH 53/96] No `printlog` function so `echo` it is --- MDM/Jamf/00_PrepareInstall_SwiftDialog.sh | 58 +++++++++++------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh b/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh index 425a157..24ad8f5 100755 --- a/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh +++ b/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh @@ -47,92 +47,92 @@ fi # swiftDialog installation name="Dialog" -printlog "$name check for installation" +echo "$name check for installation" # download URL, version and Expected Team ID # Method for GitHub pkg w. app version check gitusername="bartreardon" gitreponame="swiftDialog" -#printlog "$gitusername $gitreponame" +#echo "$gitusername $gitreponame" filetype="pkg" downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then - printlog "Trying GitHub API for download URL." + echo "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") fi -#printlog "$downloadURL" +#echo "$downloadURL" appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') -#printlog "$appNewVersion" +#echo "$appNewVersion" expectedTeamID="PWA5E9TQ59" destFile="/Library/Application Support/Dialog/Dialog.app" versionKey="CFBundleShortVersionString" #CFBundleVersion currentInstalledVersion="$(defaults read "${destFile}/Contents/Info.plist" $versionKey || true)" -printlog "${name} version: $currentInstalledVersion" +echo "${name} version: $currentInstalledVersion" if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then - printlog "$name not found or version not latest." - printlog "${destFile}" - printlog "Installing version ${appNewVersion}…" + echo "$name not found or version not latest." + echo "${destFile}" + echo "Installing version ${appNewVersion}…" # Create temporary working directory tmpDir="$(mktemp -d || true)" - printlog "Created working directory '$tmpDir'" + echo "Created working directory '$tmpDir'" # Download the installer package - printlog "Downloading $name package version $appNewVersion from: $downloadURL" + echo "Downloading $name package version $appNewVersion from: $downloadURL" installationCount=0 exitCode=9 while [[ $installationCount -lt 3 && $exitCode -gt 0 ]]; do curlDownload=$(curl -Ls "$downloadURL" -o "$tmpDir/$name.pkg" || true) curlDownloadStatus=$(echo $?) if [[ $curlDownloadStatus -ne 0 ]]; then - printlog "error downloading $downloadURL, with status $curlDownloadStatus" - printlog "${curlDownload}" + echo "error downloading $downloadURL, with status $curlDownloadStatus" + echo "${curlDownload}" exitCode=1 else - printlog "Download $name succes." + echo "Download $name succes." # Verify the download teamID=$(spctl -a -vv -t install "$tmpDir/$name.pkg" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' || true) - printlog "Team ID for downloaded package: $teamID" + echo "Team ID for downloaded package: $teamID" # Install the package if Team ID validates if [ "$expectedTeamID" = "$teamID" ] || [ "$expectedTeamID" = "" ]; then - printlog "$name package verified. Installing package '$tmpDir/$name.pkg'." + echo "$name package verified. Installing package '$tmpDir/$name.pkg'." pkgInstall=$(installer -verbose -dumplog -pkg "$tmpDir/$name.pkg" -target "/" 2>&1) pkgInstallStatus=$(echo $?) if [[ $pkgInstallStatus -ne 0 ]]; then - printlog "ERROR. $name package installation failed." - printlog "${pkgInstall}" + echo "ERROR. $name package installation failed." + echo "${pkgInstall}" exitCode=2 else - printlog "Installing $name package succes." + echo "Installing $name package succes." exitCode=0 fi else - printlog "ERROR. Package verification failed for $name before package installation could start. Download link may be invalid." + echo "ERROR. Package verification failed for $name before package installation could start. Download link may be invalid." exitCode=3 fi fi ((installationCount++)) - printlog "$installationCount time(s), exitCode $exitCode" + echo "$installationCount time(s), exitCode $exitCode" if [[ $installationCount -lt 3 ]]; then if [[ $exitCode -gt 0 ]]; then - printlog "Sleep a bit before trying download and install again. $installationCount time(s)." - printlog "Remove $(rm -fv "$tmpDir/$name.pkg" || true)" + echo "Sleep a bit before trying download and install again. $installationCount time(s)." + echo "Remove $(rm -fv "$tmpDir/$name.pkg" || true)" sleep 2 fi else - printlog "Download and install of $name succes." + echo "Download and install of $name succes." fi done # Remove the temporary working directory - printlog "Deleting working directory '$tmpDir' and its contents." - printlog "Remove $(rm -Rfv "${tmpDir}" || true)" + echo "Deleting working directory '$tmpDir' and its contents." + echo "Remove $(rm -Rfv "${tmpDir}" || true)" # Handle installation errors if [[ $exitCode != 0 ]]; then - printlog "ERROR. Installation of $name failed. Aborting." + echo "ERROR. Installation of $name failed. Aborting." caffexit $exitCode else - printlog "$name version $appNewVersion installed!" + echo "$name version $appNewVersion installed!" fi else - printlog "$name version $appNewVersion already found. Perfect!" + echo "$name version $appNewVersion already found. Perfect!" fi # check for Swift Dialog From 53cbc342c36d5c20f510b1432b34c5388b910f83 Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 21 Sep 2022 09:04:06 +0200 Subject: [PATCH 54/96] Minor renaming of a few file names --- MDM/Progress 1st swiftDialog.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MDM/Progress 1st swiftDialog.sh b/MDM/Progress 1st swiftDialog.sh index c7315af..acfe9a1 100755 --- a/MDM/Progress 1st swiftDialog.sh +++ b/MDM/Progress 1st swiftDialog.sh @@ -54,7 +54,7 @@ errorMessage="A problem was encountered setting up this Mac. Please contact IT." # # Log: /private/var/log/InstallationProgress.log # This file prevents script from running again on Addigy and Microsoft Endpoint (Intune): -# "/var/db/.Installation1stProgress" +# "/var/db/.Progress1stDone" # # Display a Dialog with a list of applications and indicate when they’ve been installed # Useful when apps are deployed at random, perhaps without local logging. @@ -114,10 +114,10 @@ esac # Mark: Constants and logging export PATH=/usr/bin:/bin:/usr/sbin:/sbin -log_message="$instance: Installation 1st Progress with Dialog, v$scriptVersion" -label="D1st-v$scriptVersion" +log_message="$instance: Progress 1st with Dialog, v$scriptVersion" +label="P1st-v$scriptVersion" -log_location="/private/var/log/Installation1stProgress.log" +log_location="/private/var/log/Progress1st.log" function printlog(){ timestamp=$(date +%F\ %T) if [[ "$(whoami)" == "root" ]]; then @@ -137,7 +137,7 @@ fi # Location of dialog and dialog command file dialogApp="/usr/local/bin/dialog" dialog_command_file="/var/tmp/dialog.log" -counterFile="/var/tmp/Installation1stProgress.plist" +counterFile="/var/tmp/Progress1st.plist" # Counters progress_index=0 From 44cee15ac2b651a12df5aabcf2251fbd35279600 Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 21 Sep 2022 09:05:05 +0200 Subject: [PATCH 55/96] Dialog cmd file: `/var/tmp/dialog.log` --- MDM/Jamf/ReadMe.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MDM/Jamf/ReadMe.md b/MDM/Jamf/ReadMe.md index db3d35d..e9cf769 100644 --- a/MDM/Jamf/ReadMe.md +++ b/MDM/Jamf/ReadMe.md @@ -20,7 +20,7 @@ The different scripts require a set of parameters. We will use the `googlechrome `00_Prepare_SwiftDialog.sh` -Parameter 4: `/var/tmp/dialog` (Path to the swiftDialog command file) +Parameter 4: `/var/tmp/dialog.log` (Path to the swiftDialog command file) Parameter 5: `Installing Google Chrome...` (text shown in the swiftDialog window above the progress bar) @@ -30,7 +30,7 @@ Parameter 6: Path to or URL for an icon in swiftDialog. This can be a path on th Parameter 4: `googlechromepkg` (the label to install) -Parameter 5: `DIALOG_CMD_FILE=\var\log\dialog.log` (the swiftDialog command file, this has to be the same value as parameter 4 in the previous script) +Parameter 5: `DIALOG_CMD_FILE=/var/tmp/dialog.log` (the swiftDialog command file, this has to be the same value as parameter 4 in the previous script) Parameter 6: `NOTIFY=silent` (disable Installomator notifications, optional) @@ -38,7 +38,7 @@ You can add more configurations to the Installomator script when needed. `zz_Quit_SwiftDialog` -Parameter 4: `/var/log/dialog.log` (the swiftDialog command file, this has to be the same value as parameter 4 in the first script) +Parameter 4: `/var/tmp/dialog.log` (the swiftDialog command file, this has to be the same value as parameter 4 in the first script) Then setup the remainder of the Jamf Policy to your needs. This works best with Self Service policies. From 24c550477a13f8aeb734674d03f1e633973fe04c Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 21 Sep 2022 11:34:01 +0200 Subject: [PATCH 56/96] GitHub download fix --- .../App normal SS.sh | 2 +- MDM/Installomator 1st Auto-install DEPNotify.sh | 6 ++++-- MDM/Installomator 1st Auto-install.sh | 6 ++++-- MDM/Installomator 1st SS DEPNotify.sh | 6 ++++-- MDM/Installomator 1st SS.sh | 6 ++++-- MDM/Jamf/00_PrepareInstall_SwiftDialog.sh | 3 ++- MDM/Progress 1st swiftDialog.sh | 6 ++++-- MDM/install Installomator direct.sh | 6 ++++-- MDM/install swiftDialog direct.sh | 6 ++++-- 9 files changed, 31 insertions(+), 16 deletions(-) diff --git a/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh index 97e4398..9420b4d 100644 --- a/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh @@ -8,7 +8,7 @@ item="cyberduck" # enter the software to install # Examples: microsoftedge, brave, googlechromepkg, firefoxpkg # Dialog icon -icon="https://mosylebusinessweb.blob.core.windows.net/envoit-public/customcommand_icon-envoit_666767b6276ff1f31b1ff9719639cf36f761f29f63f2ff17fc.png" +icon="" # icon should be a file system path or an URL to an online PNG, so beginning with either “/” or “http”. # In Mosyle an URL can be found by copy picture address from a Custom Command icon. diff --git a/MDM/Installomator 1st Auto-install DEPNotify.sh b/MDM/Installomator 1st Auto-install DEPNotify.sh index 18db8d8..3a4922a 100755 --- a/MDM/Installomator 1st Auto-install DEPNotify.sh +++ b/MDM/Installomator 1st Auto-install DEPNotify.sh @@ -54,7 +54,8 @@ errorMessage="A problem was encountered setting up this Mac. Please contact IT." # https://github.com/Installomator/Installomator # ###################################################################### -scriptVersion="9.4" +scriptVersion="9.5" +# v. 9.5 : 2022-09-21 : change of GitHub download # v. 9.4 : 2022-09-14 : 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. @@ -206,7 +207,8 @@ gitusername="Installomator" gitreponame="Installomator" #printlog "$gitusername $gitreponame" filetype="pkg" -downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +#downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") diff --git a/MDM/Installomator 1st Auto-install.sh b/MDM/Installomator 1st Auto-install.sh index 46c2188..cf37d9c 100755 --- a/MDM/Installomator 1st Auto-install.sh +++ b/MDM/Installomator 1st Auto-install.sh @@ -51,7 +51,8 @@ errorMessage="A problem was encountered setting up this Mac. Please contact IT." # https://github.com/Installomator/Installomator # ###################################################################### -scriptVersion="9.4" +scriptVersion="9.5" +# v. 9.5 : 2022-09-21 : change of GitHub download # 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. @@ -176,7 +177,8 @@ gitusername="Installomator" gitreponame="Installomator" #printlog "$gitusername $gitreponame" filetype="pkg" -downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +#downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") diff --git a/MDM/Installomator 1st SS DEPNotify.sh b/MDM/Installomator 1st SS DEPNotify.sh index eec89df..c2450c0 100755 --- a/MDM/Installomator 1st SS DEPNotify.sh +++ b/MDM/Installomator 1st SS DEPNotify.sh @@ -54,7 +54,8 @@ errorMessage="A problem was encountered setting up this Mac. Please contact IT." # https://github.com/Installomator/Installomator # ###################################################################### -scriptVersion="9.4" +scriptVersion="9.5" +# v. 9.5 : 2022-09-21 : change of GitHub download # v. 9.4 : 2022-09-14 : 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. @@ -206,7 +207,8 @@ gitusername="Installomator" gitreponame="Installomator" #printlog "$gitusername $gitreponame" filetype="pkg" -downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +#downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") diff --git a/MDM/Installomator 1st SS.sh b/MDM/Installomator 1st SS.sh index 9654f76..9a55da0 100755 --- a/MDM/Installomator 1st SS.sh +++ b/MDM/Installomator 1st SS.sh @@ -51,7 +51,8 @@ errorMessage="A problem was encountered setting up this Mac. Please contact IT." # https://github.com/Installomator/Installomator # ###################################################################### -scriptVersion="9.4" +scriptVersion="9.5" +# v. 9.5 : 2022-09-21 : change of GitHub download # 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. @@ -176,7 +177,8 @@ gitusername="Installomator" gitreponame="Installomator" #printlog "$gitusername $gitreponame" filetype="pkg" -downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +#downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") diff --git a/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh b/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh index 24ad8f5..84a1212 100755 --- a/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh +++ b/MDM/Jamf/00_PrepareInstall_SwiftDialog.sh @@ -54,7 +54,8 @@ gitusername="bartreardon" gitreponame="swiftDialog" #echo "$gitusername $gitreponame" filetype="pkg" -downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +#downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then echo "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") diff --git a/MDM/Progress 1st swiftDialog.sh b/MDM/Progress 1st swiftDialog.sh index acfe9a1..f6efde8 100755 --- a/MDM/Progress 1st swiftDialog.sh +++ b/MDM/Progress 1st swiftDialog.sh @@ -86,7 +86,8 @@ errorMessage="A problem was encountered setting up this Mac. Please contact IT." # Or fonts, like: # "Apple SF Pro Font,/Library/Fonts/SF-Pro.ttf" ###################################################################### -scriptVersion="9.4" +scriptVersion="9.5" +# v. 9.5 : 2022-09-21 : change of GitHub download # v. 9.4 : 2022-09-14 : downloadURL can fall back on GitHub API # v. 9.3 : 2022-08-29 : Logging changed for current version. Improved installation with looping if it fails, so it can try again. Improved GitHub handling. # v. 9.2.2 : 2022-06-17 : Improved Dialog installation. Check 1.1.1.1 for internet connection. @@ -229,7 +230,8 @@ gitusername="bartreardon" gitreponame="swiftDialog" #printlog "$gitusername $gitreponame" filetype="pkg" -downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +#downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") diff --git a/MDM/install Installomator direct.sh b/MDM/install Installomator direct.sh index ee7fbcf..352275e 100755 --- a/MDM/install Installomator direct.sh +++ b/MDM/install Installomator direct.sh @@ -16,7 +16,8 @@ # https://github.com/Installomator/Installomator # ###################################################################### -scriptVersion="9.4" +scriptVersion="9.5" +# v. 9.5 : 2022-09-21 : change of GitHub download # v. 9.4 : 2022-09-14 : downloadURL can fall back on GitHub API # v. 9.3 : 2022-08-29 : Logging changed for current version. Improved installation with looping if it fails, so it can try again. Improved GitHub handling. # v. 9.2.2 : 2022-06-17 : Check 1.1.1.1 for internet connection. @@ -64,7 +65,8 @@ gitusername="Installomator" gitreponame="Installomator" #printlog "$gitusername $gitreponame" filetype="pkg" -downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +#downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") diff --git a/MDM/install swiftDialog direct.sh b/MDM/install swiftDialog direct.sh index 1b16e3c..c29d299 100755 --- a/MDM/install swiftDialog direct.sh +++ b/MDM/install swiftDialog direct.sh @@ -16,7 +16,8 @@ # https://github.com/Installomator/Installomator # ###################################################################### -scriptVersion="9.4" +scriptVersion="9.5" +# v. 9.5 : 2022-09-21 : change of GitHub download # v. 9.4 : 2022-09-14 : downloadURL can fall back on GitHub API. # v. 9.3 : 2022-08-29 : Logging changed for current version. Improved installation with looping if it fails, so it can try again. Improved GitHub handling. # v. 9.2.2 : 2022-06-17 : Check 1.1.1.1 for internet connection. @@ -64,7 +65,8 @@ gitusername="bartreardon" gitreponame="swiftDialog" #printlog "$gitusername $gitreponame" filetype="pkg" -downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +#downloadURL="https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" +downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") From 91af2427fa3535db2eb7ad5453eb3f3e533b54c5 Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 21 Sep 2022 11:58:56 +0200 Subject: [PATCH 57/96] Fix for #698 GitHub download links changed, fixed #698. --- fragments/functions.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index 85a7902..74045da 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -162,13 +162,15 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name fi if [ -n "$archiveName" ]; then - downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) + #downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) + downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*$archiveName")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") fi else - downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1) + #downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1) + downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") From 0a4c8cfe6eab8eded00b5b30069e11bb2bc96c32 Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 21 Sep 2022 17:36:03 +0200 Subject: [PATCH 58/96] Cleaning --- .../App normal SS.sh | 2 +- MDM/App-install/App normal Auto-install.sh | 12 ++++++------ MDM/App-install/App normal SS.sh | 3 ++- MDM/Installomator 1st Auto-install.sh | 3 ++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh index 9420b4d..b1b1256 100644 --- a/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh @@ -5,7 +5,7 @@ LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" item="cyberduck" # enter the software to install -# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg +# Examples: adobecreativeclouddesktop, canva, cyberduck, handbrake, inkscape, textmate, vlc # Dialog icon icon="" diff --git a/MDM/App-install/App normal Auto-install.sh b/MDM/App-install/App normal Auto-install.sh index a43cdff..75bd4f0 100644 --- a/MDM/App-install/App normal Auto-install.sh +++ b/MDM/App-install/App normal Auto-install.sh @@ -4,7 +4,7 @@ LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -what="" # enter the software to install +item="" # enter the software to install # Examples: adobecreativeclouddesktop, textmate, vlc installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user" # Separated by space @@ -28,7 +28,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user" # Separated by space # INSTALL=force ###################################################################### # To be used as a script sent out from a MDM. -# Fill the variable "what" above with a label. +# Fill the variable "item" above with a label. # Script will run this label through Installomator. ###################################################################### # v. 9.2.1 : Better logging handling and installomatorOptions fix. @@ -38,7 +38,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user" # Separated by space # PATH declaration export PATH=/usr/bin:/bin:/usr/sbin:/sbin -echo "$(date +%F\ %T) [LOG-BEGIN] $what" +echo "$(date +%F\ %T) [LOG-BEGIN] $item" # Verify that Installomator has been installed destFile="/usr/local/Installomator/Installomator.sh" @@ -59,16 +59,16 @@ caffexit () { } # Install software using Installomator -cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || true)" +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || 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} -eq 0 ]] ; then - echo "${what} succesfully installed." + echo "${item} succesfully installed." warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" echo "$warnOutput" else - echo "ERROR installing ${what}. Exit code ${exitStatus}" + echo "ERROR installing ${item}. Exit code ${exitStatus}" echo "$cmdOutput" #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" #echo "$errorOutput" diff --git a/MDM/App-install/App normal SS.sh b/MDM/App-install/App normal SS.sh index 5481991..146e3f1 100644 --- a/MDM/App-install/App normal SS.sh +++ b/MDM/App-install/App normal SS.sh @@ -5,7 +5,8 @@ LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" what="" # enter the software to install -# Examples: adobecreativeclouddesktop, textmate, vlc +# Examples: adobecreativeclouddesktop, canva, cyberduck, handbrake, inkscape, textmate, vlc + installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=all" # Separated by space diff --git a/MDM/Installomator 1st Auto-install.sh b/MDM/Installomator 1st Auto-install.sh index cf37d9c..5bb2d70 100755 --- a/MDM/Installomator 1st Auto-install.sh +++ b/MDM/Installomator 1st Auto-install.sh @@ -17,7 +17,8 @@ errorMessage="A problem was encountered setting up this Mac. Please contact IT." ###################################################################### # Installomator 1st # -# Installation using Installomator (use separate Installation1stProgress script to show progress) +# Installation using Installomator +# (use separate Progress 1st script to show progress) # No customization below… ###################################################################### # This script can be used to install software using Installomator. From 515087f7e91607d709f4c4f55979a8684eb227fe Mon Sep 17 00:00:00 2001 From: Theile Date: Fri, 23 Sep 2022 14:48:09 +0200 Subject: [PATCH 59/96] More minor tweaks --- .../App browser-security SS.sh | 2 +- MDM/Progress 1st swiftDialog.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh index 7573f1f..f04ddf6 100755 --- a/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh @@ -8,7 +8,7 @@ item="firefoxpkg" # enter the software to install # Examples: microsoftedge, brave, googlechromepkg, firefoxpkg # Dialog icon -icon="https://mosylebusinessweb.blob.core.windows.net/envoit-public/customcommand_icon-envoit_3e37cc23e3fd8d29b1fbe85bc3b3923b323627dc83153cf673.png" +icon="" # icon should be a file system path or an URL to an online PNG. # In Mosyle an URL can be found by copy picture address from a Custom Command icon. diff --git a/MDM/Progress 1st swiftDialog.sh b/MDM/Progress 1st swiftDialog.sh index f6efde8..2cc4792 100755 --- a/MDM/Progress 1st swiftDialog.sh +++ b/MDM/Progress 1st swiftDialog.sh @@ -118,7 +118,7 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin log_message="$instance: Progress 1st with Dialog, v$scriptVersion" label="P1st-v$scriptVersion" -log_location="/private/var/log/Progress1st.log" +log_location="/private/var/log/Installomator.log" function printlog(){ timestamp=$(date +%F\ %T) if [[ "$(whoami)" == "root" ]]; then From d00ddbc891acf61191205c0d6bb0d138999e36c0 Mon Sep 17 00:00:00 2001 From: Theile Date: Fri, 23 Sep 2022 16:27:24 +0200 Subject: [PATCH 60/96] Create README.md --- MDM/README.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 MDM/README.md diff --git a/MDM/README.md b/MDM/README.md new file mode 100644 index 0000000..80f5d09 --- /dev/null +++ b/MDM/README.md @@ -0,0 +1,74 @@ +# MDM scripts + +This is a long list of various scripts for certain use in MDM solutions that cannot call a script internally with parameters, like Jamf Pro can do it. + +So for Mosyle, Addigy, and Microsoft Endpoint Manager (Intune), these are know to be good. If these works in other MDMs, let us know. + +Especially for Addigy, and maybe also for other MDMs, `condition`-scripts has been added if software installation will run on certain conditions. Also `prevention`-scripts has been added, if you manually need to eliminate the runnning of a script, this can be needed if you want to use the enrollment script, but don’t want it to run on the currently managed Macs Then you should sent out the `prevention`-script to make sure the file it creates is present on the Macs so the ordinary script will not do anything (it will detect this file and stop if found). + +### Shortenings + +- SS — Self Service — scripts designed for use through a Self Service catalog +- VFA — valuesfromarguments — a custom label call to Installomator + +# To be installed on all the Macs + +In order for our MDM scripts to work, we need Installomator locally installed using the pkg we provide in our release. + +So I suggest to install these on enrollment. + +To utilize swiftDialog, we also need that installed. + +If you need dockutil, that should be maintained as well, but if missing the MDM scripts will install it. + +## Maintenance of Installomator, swiftDialog, and dockutil + +I suggest to check weekly, and maybe at each boot, it newer versions have been released of these tools. + +The verious MDMs have various ways of running scheduled, but it is possible. + +### Scripts to use for installing these components + +These do not require anything to be installed on macOS: + +- `install Installomator direct.sh` — can be run at enrollment and as maintenance at any time to install __Installomator__. + +- `install swiftDialog direct.sh` — can be used at enrollment and as maintenance at any time to install __swiftDialog__. + +Once Installomator has been installed, __dockutil__ can be installed using Installomator (as a service), using this script: + +- `App-install/App service Auto-install.sh` — This script uses pre-installed installomator to install dockutil. + +# Enrollment scripts + +For enrollment purposes, som 1st-scripts has been created. One is not showing anything to the end-user while running and another is using __DEPNotify__ to show progress (so hopefully the user will wait for the installation to finish): + +- `Installomator 1st Auto-install DEPNotify.sh` — will install __DEPNotify__ first, start that up, and change progress on the installation bar at each installed label. Very good for Addigy. + +- `Installomator 1st Auto-install.sh` — runnning silently installing Installomator labels in the given order. Can be used in combination with the Progress-script. + +- `Progress 1st swiftDialog.sh` — It will install __swiftDialog__ and start that up with a list of software it will look for. It will look for an installed file/folder in the file system for each item. This is great for Mosyle that can install software using various methods, and then this script can show when it has been installed. + +There are also Self Service scripts for this, if it’s somehow needed to have users running the installation manually. + +# App-installation + +Two different kinds of App-installation scripts have been made. Some that is very similar to the old provided scripts that are only using __Installomator__ for notifications (if any). And others that can use __swiftDialog__ for installation progress, and can also add the app to the Dock using __dockutil__. + +## “App-install”-folder + +- App browser-security Auto-install.sh +- App browser-security SS.sh +- App normal Auto-install.sh +- App normal SS.sh +- App service Auto-install.sh +- App VFA.sh + +## “App-install SS with swiftDialog and dockutil”-folder + +- App browser-security SS.sh +- App normal SS multi-app.sh +- App normal SS.sh +- App service SS.sh +- App VFA SS github.sh +- App VFA SS.sh From 92d7bec606c9b015ac8d33b384f21641bdc477c1 Mon Sep 17 00:00:00 2001 From: Theile Date: Mon, 26 Sep 2022 11:50:17 +0200 Subject: [PATCH 61/96] Update README.md --- MDM/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MDM/README.md b/MDM/README.md index 80f5d09..3ded69b 100644 --- a/MDM/README.md +++ b/MDM/README.md @@ -64,6 +64,10 @@ Two different kinds of App-installation scripts have been made. Some that is ver - App service Auto-install.sh - App VFA.sh +Here you can use scripts for Self Service (SS) or for Auto-install. THere will be a difference in how many notifications will be used and maybe handling of blocking processes. + +What is also differentiated is what kind of app it is. Is it of the kind of browser, that can often have critical security fixes, then we don’t want the user to postpone the installation, wheras a normal app can wait. A service app do not have to ask before installing, and should be able to install regardsliess if the app is currently running. + ## “App-install SS with swiftDialog and dockutil”-folder - App browser-security SS.sh @@ -72,3 +76,7 @@ Two different kinds of App-installation scripts have been made. Some that is ver - App service SS.sh - App VFA SS github.sh - App VFA SS.sh + +All of the notes for the above scripts are the same for these. + +But these scripts utilize __swiftDialog__ to show a more live progress for the installation, and they also have a setting to use __dockutil__ to add the software to the Dock of the user. From 82b429a4bef2d7ef5b6939877ba1e616af3faeb2 Mon Sep 17 00:00:00 2001 From: Theile Date: Mon, 26 Sep 2022 14:43:43 +0200 Subject: [PATCH 62/96] R project for Apple Silicon and intel --- fragments/labels/r.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fragments/labels/r.sh b/fragments/labels/r.sh index 1c98852..fd9e6b4 100644 --- a/fragments/labels/r.sh +++ b/fragments/labels/r.sh @@ -1,7 +1,12 @@ r) name="R" type="pkg" - downloadURL="https://cloud.r-project.org/bin/macosx/$( curl -fsL https://cloud.r-project.org/bin/macosx/ | grep -m 1 -o '' | sed -E 's/.+"(.+)".+/\1/g' )" - appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g') + if [[ $(arch) == "arm64" ]]; then + downloadURL="https://cloud.r-project.org/bin/macosx/$( curl -fsL https://cloud.r-project.org/bin/macosx/ | grep -m 1 -o '' | sed -E 's/.+"(.+)".+/\1/g' )" + appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)-.*\..*/\1/g') + elif [[ $(arch) == "i386" ]]; then + downloadURL="https://cloud.r-project.org/bin/macosx/$( curl -fsL https://cloud.r-project.org/bin/macosx/ | grep -o '' | grep -m 1 -v "arm64" | sed -E 's/.+"(.+)".+/\1/g' )" + appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g') + fi expectedTeamID="VZLD955F6P" ;; From 1c45e091348cc86079f4ed7e13eca471875a1d90 Mon Sep 17 00:00:00 2001 From: Theile Date: Mon, 26 Sep 2022 15:11:51 +0200 Subject: [PATCH 63/96] RStudio with a matching `appNewVersion` --- fragments/labels/rstudio.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/labels/rstudio.sh b/fragments/labels/rstudio.sh index 22f735e..6ff3755 100644 --- a/fragments/labels/rstudio.sh +++ b/fragments/labels/rstudio.sh @@ -2,6 +2,6 @@ rstudio) name="RStudio" type="dmg" downloadURL=$(curl -s -L "https://rstudio.com/products/rstudio/download/" | grep -m 1 -Eio 'href="https://download1.rstudio.org/desktop/macos/RStudio-(.*).dmg"' | cut -c7- | sed -e 's/"$//') - appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g' ) + appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.-]*)\..*/\1/g' | sed 's/-/+/' ) expectedTeamID="FYF2F5GFX4" ;; From a68ac0d065f8cb69b5bd272bd55cdbb7de5f8bea Mon Sep 17 00:00:00 2001 From: Theile Date: Mon, 26 Sep 2022 15:45:51 +0200 Subject: [PATCH 64/96] Missing notification and other fields for Installomator call --- .../App VFA SS github.sh | 8 ++++++-- .../App VFA SS.sh | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/MDM/App-install SS with swiftDialog and dockutil/App VFA SS github.sh b/MDM/App-install SS with swiftDialog and dockutil/App VFA SS github.sh index 8d9365d..a235945 100755 --- a/MDM/App-install SS with swiftDialog and dockutil/App VFA SS github.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App VFA SS github.sh @@ -3,7 +3,7 @@ # Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) # Installation of software using `valuesfromarguments` to install a custom software using Installomator through GitHub -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" #item="gfxcardstatus" # enter the software to install (if it has a label in future version of Installomator) @@ -63,8 +63,10 @@ versionFromGit() { # Variables for label name="gfxCardStatus" type="zip" +packageID="" downloadURL="$(downloadURLFromGit codykrieger gfxCardStatus)" appNewVersion="$(versionFromGit codykrieger gfxCardStatus)" +versionKey="" expectedTeamID="LF22FTQC25" # Dialog icon @@ -294,10 +296,12 @@ fi cmdOutput="$(${destFile} valuesfromarguments LOGO=$LOGO \ name=${name} \ type=${type} \ + packageID=${packageID} \ downloadURL=\"$downloadURL\" \ appNewVersion=${appNewVersion} \ + versionKey=${versionKey} \ expectedTeamID=${expectedTeamID} \ - ${installomatorOptions} || true)" + ${installomatorOptions} ${installomatorNotify} || true)" checkCmdOutput $cmdOutput diff --git a/MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh index 31cf097..e6dc82b 100755 --- a/MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh @@ -3,15 +3,17 @@ # Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) # Installation of software using `valuesfromarguments` to install a custom software using Installomator -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" #item="" # enter the software to install (if it has a label in future version of Installomator) # Variables for label name="ClickShare" type="appInDmgInZip" +packageID="" downloadURL="https://www.barco.com$( curl -fs "https://www.barco.com/en/clickshare/app" | grep -A6 -i "macos" | grep -i "FileNumber" | tr '"' "\n" | grep -i "FileNumber" )" appNewVersion="$(eval "$( echo $downloadURL | sed -E 's/.*(MajorVersion.*BuildVersion=[0-9]*).*/\1/' | sed 's/&//g' )" ; ((MajorVersion++)) ; ((MajorVersion--)); ((MinorVersion++)) ; ((MinorVersion--)); ((PatchVersion++)) ; ((PatchVersion--)); ((BuildVersion++)) ; ((BuildVersion--)); echo "${MajorVersion}.${MinorVersion}.${PatchVersion}-b${BuildVersion}")" +versionKey="" expectedTeamID="P6CDJZR997" # Dialog icon @@ -242,10 +244,12 @@ fi cmdOutput="$(${destFile} valuesfromarguments LOGO=$LOGO \ name=${name} \ type=${type} \ + packageID=${packageID} \ downloadURL=\"$downloadURL\" \ appNewVersion=${appNewVersion} \ + versionKey=${versionKey} \ expectedTeamID=${expectedTeamID} \ - ${installomatorOptions} || true)" + ${installomatorOptions} ${installomatorNotify} || true)" checkCmdOutput $cmdOutput From ddc7a67e38d1fd7820c0884bfb231bdb462666c2 Mon Sep 17 00:00:00 2001 From: Theile Date: Mon, 26 Sep 2022 16:13:35 +0200 Subject: [PATCH 65/96] Corrections and fixes --- .../App VFA SS.sh | 3 +-- MDM/App-install/App VFA.sh | 7 ++++++- MDM/App-install/App service Auto-install.sh | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh index e6dc82b..2089f9b 100755 --- a/MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App VFA SS.sh @@ -103,8 +103,7 @@ uid=$(id -u "$currentUser") userHome="$(dscl . -read /users/${currentUser} NFSHomeDirectory | awk '{print $2}')" # Verify that Installomator has been installed -#destFile="/usr/local/Installomator/Installomator.sh" -destFile="/usr/local/Installomator/Installomator10.sh" +destFile="/usr/local/Installomator/Installomator.sh" if [ ! -e "${destFile}" ]; then echo "Installomator not found here:" echo "${destFile}" diff --git a/MDM/App-install/App VFA.sh b/MDM/App-install/App VFA.sh index 1772419..beca08c 100755 --- a/MDM/App-install/App VFA.sh +++ b/MDM/App-install/App VFA.sh @@ -10,8 +10,10 @@ LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" # Variables for label name="ClickShare" type="appInDmgInZip" +packageID="" downloadURL="https://www.barco.com$( curl -fs "https://www.barco.com/en/clickshare/app" | grep -A6 -i "macos" | grep -i "FileNumber" | tr '"' "\n" | grep -i "FileNumber" )" appNewVersion="$(eval "$( echo $downloadURL | sed -E 's/.*(MajorVersion.*BuildVersion=[0-9]*).*/\1/' | sed 's/&//g' )" ; ((MajorVersion++)) ; ((MajorVersion--)); ((MinorVersion++)) ; ((MinorVersion--)); ((PatchVersion++)) ; ((PatchVersion--)); ((BuildVersion++)) ; ((BuildVersion--)); echo "${MajorVersion}.${MinorVersion}.${PatchVersion}-b${BuildVersion}")" +versionKey="" expectedTeamID="P6CDJZR997" installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user LOGGING=INFO NOTIFY=all" # Separated by space @@ -67,11 +69,14 @@ caffexit () { # Install software using Installomator with valuesfromarguments cmdOutput="$(${destFile} valuesfromarguments LOGO=$LOGO \ - name=${name} \ + name=\"${name}\" \ type=${type} \ + packageID=${packageID} \ downloadURL=\"$downloadURL\" \ appNewVersion=${appNewVersion} \ + versionKey=${versionKey} \ expectedTeamID=${expectedTeamID} \ + blockingProcesses=\"NONE\" \ ${installomatorOptions} || true)" diff --git a/MDM/App-install/App service Auto-install.sh b/MDM/App-install/App service Auto-install.sh index 0f5b5f1..a79358d 100644 --- a/MDM/App-install/App service Auto-install.sh +++ b/MDM/App-install/App service Auto-install.sh @@ -2,7 +2,7 @@ # Installation using Installomator -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" what="dockutil" # enter the software to install # Examples: adobecreativeclouddesktop, textmate, vlc From e3f5b2bebd7a2401f2308f797a5a5312d9cb6227 Mon Sep 17 00:00:00 2001 From: Theile Date: Tue, 27 Sep 2022 08:58:52 +0200 Subject: [PATCH 66/96] Making LOGO empty --- .../App browser-security SS.sh | 4 ++-- .../App normal SS multi-app.sh | 4 ++-- .../App normal SS.sh | 4 ++-- .../App service SS.sh | 4 ++-- MDM/App-install/App VFA.sh | 2 +- MDM/App-install/App browser-security Auto-install.sh | 2 +- MDM/App-install/App browser-security SS.sh | 2 +- MDM/App-install/App normal Auto-install.sh | 2 +- MDM/App-install/App normal SS.sh | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh index f04ddf6..3756e7a 100755 --- a/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh @@ -2,9 +2,9 @@ # Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -item="firefoxpkg" # enter the software to install +item="" # enter the software to install # Examples: microsoftedge, brave, googlechromepkg, firefoxpkg # Dialog icon diff --git a/MDM/App-install SS with swiftDialog and dockutil/App normal SS multi-app.sh b/MDM/App-install SS with swiftDialog and dockutil/App normal SS multi-app.sh index 71eba78..0cc2af9 100644 --- a/MDM/App-install SS with swiftDialog and dockutil/App normal SS multi-app.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App normal SS multi-app.sh @@ -2,10 +2,10 @@ # Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" item="microsoftoffice365" # enter the software to install -# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg +# Examples: microsoftofficebusinesspro, microsoftoffice365 # Dialog icon icon="" diff --git a/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh index b1b1256..77f7add 100644 --- a/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App normal SS.sh @@ -2,9 +2,9 @@ # Installation using Installomator with Dialog showing progress (and posibility of adding to the Dock) -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -item="cyberduck" # enter the software to install +item="" # enter the software to install # Examples: adobecreativeclouddesktop, canva, cyberduck, handbrake, inkscape, textmate, vlc # Dialog icon diff --git a/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh index ee1daa0..f39a540 100644 --- a/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh @@ -2,9 +2,9 @@ # Installation using Installomator -LOGO="addigy" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -item="xink" # enter the software to install +item="" # enter the software to install # Examples: desktoppr, dockutil, supportapp, applenyfonts, applesfpro, applesfmono, applesfcompact, nomad, nudge, shield, xink # Dialog icon diff --git a/MDM/App-install/App VFA.sh b/MDM/App-install/App VFA.sh index beca08c..3162a67 100755 --- a/MDM/App-install/App VFA.sh +++ b/MDM/App-install/App VFA.sh @@ -3,7 +3,7 @@ # Installation using Installomator # Installation of software using valuesfromarguments to install a custom software using Installomator -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" #item="" # enter the software to install (if it has a label in future version of Installomator) diff --git a/MDM/App-install/App browser-security Auto-install.sh b/MDM/App-install/App browser-security Auto-install.sh index 45a52af..41a1fd6 100644 --- a/MDM/App-install/App browser-security Auto-install.sh +++ b/MDM/App-install/App browser-security Auto-install.sh @@ -2,7 +2,7 @@ # Installation using Installomator -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" what="firefoxpkg" # enter the software to install # Examples: microsoftedge, brave, googlechromepkg, firefoxpkg diff --git a/MDM/App-install/App browser-security SS.sh b/MDM/App-install/App browser-security SS.sh index 75d55f2..a75d57d 100644 --- a/MDM/App-install/App browser-security SS.sh +++ b/MDM/App-install/App browser-security SS.sh @@ -2,7 +2,7 @@ # Installation using Installomator -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" what="" # enter the software to install # Examples: microsoftedge, brave, googlechromepkg, firefoxpkg diff --git a/MDM/App-install/App normal Auto-install.sh b/MDM/App-install/App normal Auto-install.sh index 75bd4f0..986b054 100644 --- a/MDM/App-install/App normal Auto-install.sh +++ b/MDM/App-install/App normal Auto-install.sh @@ -2,7 +2,7 @@ # Installation using Installomator -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" item="" # enter the software to install # Examples: adobecreativeclouddesktop, textmate, vlc diff --git a/MDM/App-install/App normal SS.sh b/MDM/App-install/App normal SS.sh index 146e3f1..9aa6209 100644 --- a/MDM/App-install/App normal SS.sh +++ b/MDM/App-install/App normal SS.sh @@ -2,7 +2,7 @@ # Installation using Installomator -LOGO="mosyleb" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" what="" # enter the software to install # Examples: adobecreativeclouddesktop, canva, cyberduck, handbrake, inkscape, textmate, vlc From fdb717019fb5fdb875fa32766dd70917b9b66fdf Mon Sep 17 00:00:00 2001 From: Theile Date: Tue, 27 Sep 2022 10:14:56 +0200 Subject: [PATCH 67/96] Examples --- .../App service SS.sh | 2 +- MDM/App-install/App service Auto-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh index f39a540..e441c91 100644 --- a/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh @@ -5,7 +5,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" item="" # enter the software to install -# Examples: desktoppr, dockutil, supportapp, applenyfonts, applesfpro, applesfmono, applesfcompact, nomad, nudge, shield, xink +# Examples: applenyfonts, applesfarabic, applesfcompact, applesfmono, applesfpro, applesfsymbols, dialog, dockutil, knockknock, lulu, nomad, nudge, shield, supportapp, wordservice, xcreds, xink # Dialog icon icon="" diff --git a/MDM/App-install/App service Auto-install.sh b/MDM/App-install/App service Auto-install.sh index a79358d..0db91f3 100644 --- a/MDM/App-install/App service Auto-install.sh +++ b/MDM/App-install/App service Auto-install.sh @@ -5,7 +5,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" what="dockutil" # enter the software to install -# Examples: adobecreativeclouddesktop, textmate, vlc +# Examples: applenyfonts, applesfarabic, applesfcompact, applesfmono, applesfpro, applesfsymbols, dialog, dockutil, knockknock, lulu, nomad, nudge, shield, supportapp, wordservice, xcreds, xink installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated by space From e7ebeecc5bab084fd6c96fe37badaebf7badbb4e Mon Sep 17 00:00:00 2001 From: Theile Date: Tue, 27 Sep 2022 10:49:58 +0200 Subject: [PATCH 68/96] Variables cleaning --- MDM/Installomator 1st Auto-install DEPNotify.sh | 10 +++++----- MDM/Installomator 1st Auto-install.sh | 10 +++++----- MDM/Installomator 1st SS DEPNotify.sh | 10 +++++----- MDM/Installomator 1st SS.sh | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/MDM/Installomator 1st Auto-install DEPNotify.sh b/MDM/Installomator 1st Auto-install DEPNotify.sh index 3a4922a..7baa737 100755 --- a/MDM/Installomator 1st Auto-install DEPNotify.sh +++ b/MDM/Installomator 1st Auto-install DEPNotify.sh @@ -1,11 +1,11 @@ #!/bin/sh # Installomator 1st installation with DEPNotify window (auto installation at enrollment) -instance="Instance" # Name of used instance +instance="" # Name of used instance -LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -what=(dialog dockutil microsoftautoupdate supportapp applenyfonts applesfpro applesfmono applesfcompact xink zohoworkdrivetruesync textmate 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) +items=(dialog dockutil microsoftautoupdate supportapp applenyfonts applesfpro applesfmono applesfcompact xink zohoworkdrivetruesync textmate 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) # Remember: dialog dockutil installomatorOptions="NOTIFY=silent BLOCKING_PROCESS_ACTION=ignore INSTALL=force IGNORE_APP_STORE_APPS=yes LOGGING=REQ" @@ -119,7 +119,7 @@ DEPNOTIFY_LOG="/var/tmp/depnotify.log" # Counters errorCount=0 -countLabels=${#what[@]} +countLabels=${#items[@]} printlog "Total installations: $countLabels" # Using LOGO variable to specify MDM and shown logo @@ -301,7 +301,7 @@ printlog "$countLabels labels to install" startDEPNotify -for item in "${what[@]}"; do +for item in "${items[@]}"; do # Check if DEPNotify is running and try open it if not if ! pgrep -xq "DEPNotify"; then startDEPNotify diff --git a/MDM/Installomator 1st Auto-install.sh b/MDM/Installomator 1st Auto-install.sh index 5bb2d70..6dd9353 100755 --- a/MDM/Installomator 1st Auto-install.sh +++ b/MDM/Installomator 1st Auto-install.sh @@ -1,11 +1,11 @@ #!/bin/sh # Installomator 1st installation (auto installation at enrollment) -instance="Instance" # Name of used instance +instance="" # Name of used instance -LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -what=(dialog dockutil microsoftautoupdate supportapp xink zohoworkdrivetruesync textmate applenyfonts applesfpro applesfmono applesfcompact 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) +items=(dialog dockutil microsoftautoupdate supportapp xink zohoworkdrivetruesync textmate applenyfonts applesfpro applesfmono applesfcompact 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) # Remember: dialog dockutil installomatorOptions="NOTIFY=silent BLOCKING_PROCESS_ACTION=ignore INSTALL=force IGNORE_APP_STORE_APPS=yes LOGGING=REQ" @@ -111,7 +111,7 @@ caffexit () { # Counters errorCount=0 -countLabels=${#what[@]} +countLabels=${#items[@]} printlog "Total installations: $countLabels" # Using LOGO variable to specify MDM and shown logo @@ -264,7 +264,7 @@ errorLabels="" ((countLabels--)) printlog "$countLabels labels to install" -for item in "${what[@]}"; do +for item in "${items[@]}"; do printlog "$item" cmdOutput="$( ${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || true )" exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )" diff --git a/MDM/Installomator 1st SS DEPNotify.sh b/MDM/Installomator 1st SS DEPNotify.sh index c2450c0..b911f79 100755 --- a/MDM/Installomator 1st SS DEPNotify.sh +++ b/MDM/Installomator 1st SS DEPNotify.sh @@ -1,11 +1,11 @@ #!/bin/sh # Installomator 1st installation with DEPNotify window (for self Service deployment) -instance="Instance" # Name of used instance +instance="" # Name of used instance -LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -what=(dialog dockutil microsoftautoupdate supportapp applenyfonts applesfpro applesfmono applesfcompact xink zohoworkdrivetruesync textmate 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) +items=(dialog dockutil microsoftautoupdate supportapp applenyfonts applesfpro applesfmono applesfcompact xink zohoworkdrivetruesync textmate 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) # Remember: dialog dockutil installomatorOptions="NOTIFY=all BLOCKING_PROCESS_ACTION=prompt_user" @@ -119,7 +119,7 @@ DEPNOTIFY_LOG="/var/tmp/depnotify.log" # Counters errorCount=0 -countLabels=${#what[@]} +countLabels=${#items[@]} printlog "Total installations: $countLabels" # Using LOGO variable to specify MDM and shown logo @@ -301,7 +301,7 @@ printlog "$countLabels labels to install" startDEPNotify -for item in "${what[@]}"; do +for item in "${items[@]}"; do # Check if DEPNotify is running and try open it if not if ! pgrep -xq "DEPNotify"; then startDEPNotify diff --git a/MDM/Installomator 1st SS.sh b/MDM/Installomator 1st SS.sh index 9a55da0..e017831 100755 --- a/MDM/Installomator 1st SS.sh +++ b/MDM/Installomator 1st SS.sh @@ -1,11 +1,11 @@ #!/bin/sh # Installomator 1st installation (for Self Service deployment) -instance="Instance" # Name of used instance +instance="" # Name of used instance -LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -what=(dialog dockutil microsoftautoupdate supportapp applenyfonts applesfpro applesfmono applesfcompact xink zohoworkdrivetruesync textmate 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) +items=(dialog dockutil microsoftautoupdate supportapp applenyfonts applesfpro applesfmono applesfcompact xink zohoworkdrivetruesync textmate 1password7 wwdc theunarchiver keka microsoftedge microsoftteams microsoftonedrive microsoftoffice365) # Remember: dialog dockutil installomatorOptions="NOTIFY=all BLOCKING_PROCESS_ACTION=prompt_user" @@ -110,7 +110,7 @@ caffexit () { # Counters errorCount=0 -countLabels=${#what[@]} +countLabels=${#items[@]} printlog "Total installations: $countLabels" # Using LOGO variable to specify MDM and shown logo @@ -263,7 +263,7 @@ errorLabels="" ((countLabels--)) printlog "$countLabels labels to install" -for item in "${what[@]}"; do +for item in "${items[@]}"; do printlog "$item" cmdOutput="$( ${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || true )" exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )" From 9faa9a17a9b82c3bdec7374d0a78b8efa7fa8ef3 Mon Sep 17 00:00:00 2001 From: Theile Date: Tue, 27 Sep 2022 10:52:58 +0200 Subject: [PATCH 69/96] Variables cleaning --- MDM/Progress 1st swiftDialog.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MDM/Progress 1st swiftDialog.sh b/MDM/Progress 1st swiftDialog.sh index 2cc4792..f279d3d 100755 --- a/MDM/Progress 1st swiftDialog.sh +++ b/MDM/Progress 1st swiftDialog.sh @@ -1,9 +1,9 @@ #!/bin/sh # Progress 1st with swiftDialog (auto installation at enrollment) -instance="Instance" # Name of used instance +instance="" # Name of used instance -LOGO="mosyleb" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" +LOGO="" # "appstore", "jamf", "mosyleb", "mosylem", "addigy", "microsoft", "ws1" apps=( "swiftDialog,/usr/local/bin/dialog" From b7c8214b623061eca1e8551e2fedd1ccc872c6a5 Mon Sep 17 00:00:00 2001 From: Theile Date: Tue, 27 Sep 2022 11:22:59 +0200 Subject: [PATCH 70/96] Variables cleaning --- MDM/App-install/App browser-security Auto-install.sh | 12 ++++++------ MDM/App-install/App browser-security SS.sh | 2 +- MDM/App-install/App normal SS.sh | 12 ++++++------ MDM/App-install/App service Auto-install.sh | 12 ++++++------ 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/MDM/App-install/App browser-security Auto-install.sh b/MDM/App-install/App browser-security Auto-install.sh index 41a1fd6..dc06450 100644 --- a/MDM/App-install/App browser-security Auto-install.sh +++ b/MDM/App-install/App browser-security Auto-install.sh @@ -4,7 +4,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -what="firefoxpkg" # enter the software to install +item="firefoxpkg" # enter the software to install # Examples: microsoftedge, brave, googlechromepkg, firefoxpkg installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated by space @@ -28,7 +28,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated b # INSTALL=force ###################################################################### # To be used as a script sent out from a MDM. -# Fill the variable "what" above with a label. +# Fill the variable "item" above with a label. # Script will run this label through Installomator. ###################################################################### # v. 9.2.1 : Better logging handling and installomatorOptions fix. @@ -38,7 +38,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated b # PATH declaration export PATH=/usr/bin:/bin:/usr/sbin:/sbin -echo "$(date +%F\ %T) [LOG-BEGIN] $what" +echo "$(date +%F\ %T) [LOG-BEGIN] $item" # Verify that Installomator has been installed destFile="/usr/local/Installomator/Installomator.sh" @@ -59,16 +59,16 @@ caffexit () { } # Install software using Installomator -cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || true)" +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || 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} -eq 0 ]] ; then - echo "${what} succesfully installed." + echo "${item} succesfully installed." warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" echo "$warnOutput" else - echo "ERROR installing ${what}. Exit code ${exitStatus}" + echo "ERROR installing ${item}. Exit code ${exitStatus}" echo "$cmdOutput" #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" #echo "$errorOutput" diff --git a/MDM/App-install/App browser-security SS.sh b/MDM/App-install/App browser-security SS.sh index a75d57d..81dc0d5 100644 --- a/MDM/App-install/App browser-security SS.sh +++ b/MDM/App-install/App browser-security SS.sh @@ -4,7 +4,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -what="" # enter the software to install +item="" # enter the software to install # Examples: microsoftedge, brave, googlechromepkg, firefoxpkg installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit NOTIFY=all" # Separated by space diff --git a/MDM/App-install/App normal SS.sh b/MDM/App-install/App normal SS.sh index 9aa6209..06f7c04 100644 --- a/MDM/App-install/App normal SS.sh +++ b/MDM/App-install/App normal SS.sh @@ -4,7 +4,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -what="" # enter the software to install +item="" # enter the software to install # Examples: adobecreativeclouddesktop, canva, cyberduck, handbrake, inkscape, textmate, vlc @@ -29,7 +29,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=all" # Separate # INSTALL=force ###################################################################### # To be used as a script sent out from a MDM. -# Fill the variable "what" above with a label. +# Fill the variable "item" above with a label. # Script will run this label through Installomator. ###################################################################### # v. 9.2.1 : Better logging handling and installomatorOptions fix. @@ -39,7 +39,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=all" # Separate # PATH declaration export PATH=/usr/bin:/bin:/usr/sbin:/sbin -echo "$(date +%F\ %T) [LOG-BEGIN] $what" +echo "$(date +%F\ %T) [LOG-BEGIN] $item" # Verify that Installomator has been installed destFile="/usr/local/Installomator/Installomator.sh" @@ -60,16 +60,16 @@ caffexit () { } # Install software using Installomator -cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || true)" +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || 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} -eq 0 ]] ; then - echo "${what} succesfully installed." + echo "${item} succesfully installed." warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" echo "$warnOutput" else - echo "ERROR installing ${what}. Exit code ${exitStatus}" + echo "ERROR installing ${item}. Exit code ${exitStatus}" echo "$cmdOutput" #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" #echo "$errorOutput" diff --git a/MDM/App-install/App service Auto-install.sh b/MDM/App-install/App service Auto-install.sh index 0db91f3..ce282a4 100644 --- a/MDM/App-install/App service Auto-install.sh +++ b/MDM/App-install/App service Auto-install.sh @@ -4,7 +4,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" -what="dockutil" # enter the software to install +item="dockutil" # enter the software to install # Examples: applenyfonts, applesfarabic, applesfcompact, applesfmono, applesfpro, applesfsymbols, dialog, dockutil, knockknock, lulu, nomad, nudge, shield, supportapp, wordservice, xcreds, xink installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated by space @@ -28,7 +28,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated # INSTALL=force ###################################################################### # To be used as a script sent out from a MDM. -# Fill the variable "what" above with a label. +# Fill the variable "item" above with a label. # Script will run this label through Installomator. ###################################################################### # v. 9.2.1 : Better logging handling and installomatorOptions fix. @@ -38,7 +38,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated # PATH declaration export PATH=/usr/bin:/bin:/usr/sbin:/sbin -echo "$(date +%F\ %T) [LOG-BEGIN] $what" +echo "$(date +%F\ %T) [LOG-BEGIN] $item" # Verify that Installomator has been installed destFile="/usr/local/Installomator/Installomator.sh" @@ -59,16 +59,16 @@ caffexit () { } # Install software using Installomator -cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || true)" +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || 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} -eq 0 ]] ; then - echo "${what} succesfully installed." + echo "${item} succesfully installed." warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" echo "$warnOutput" else - echo "ERROR installing ${what}. Exit code ${exitStatus}" + echo "ERROR installing ${item}. Exit code ${exitStatus}" echo "$cmdOutput" #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" #echo "$errorOutput" From 2a9fd6292cae0b496bf182a34cfce76c61c928d7 Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 28 Sep 2022 10:00:34 +0200 Subject: [PATCH 71/96] Latest version is last in appcast feed --- fragments/labels/duckduckgo.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fragments/labels/duckduckgo.sh b/fragments/labels/duckduckgo.sh index a5cb4e0..e2a0768 100644 --- a/fragments/labels/duckduckgo.sh +++ b/fragments/labels/duckduckgo.sh @@ -2,9 +2,9 @@ duckduckgo) name="DuckDuckGo" type="dmg" #downloadURL="https://staticcdn.duckduckgo.com/macos-desktop-browser/duckduckgo.dmg" - #downloadURL=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@url)[last()]' 2>/dev/null | cut -d '"' -f2) - downloadURL=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2) - #appNewVersion=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@sparkle:version)[last()]' 2>/dev/null | cut -d '"' -f2) - appNewVersion=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/sparkle:shortVersionString)[1]' 2>/dev/null | cut -d ">" -f2 | cut -d "<" -f1) + downloadURL=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@url)[last()]' 2>/dev/null | cut -d '"' -f2) + #downloadURL=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2) + appNewVersion=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@sparkle:version)[last()]' 2>/dev/null | cut -d '"' -f2) + #appNewVersion=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/sparkle:shortVersionString)[1]' 2>/dev/null | cut -d ">" -f2 | cut -d "<" -f1) expectedTeamID="HKE973VLUW" ;; From f87df8bd9992bc97705909bd0eb141360fca091d Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 28 Sep 2022 12:41:50 +0200 Subject: [PATCH 72/96] Update README.md --- MDM/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MDM/README.md b/MDM/README.md index 3ded69b..efa012c 100644 --- a/MDM/README.md +++ b/MDM/README.md @@ -51,7 +51,7 @@ For enrollment purposes, som 1st-scripts has been created. One is not showing an There are also Self Service scripts for this, if it’s somehow needed to have users running the installation manually. -# App-installation +# _App-install_ folders Two different kinds of App-installation scripts have been made. Some that is very similar to the old provided scripts that are only using __Installomator__ for notifications (if any). And others that can use __swiftDialog__ for installation progress, and can also add the app to the Dock using __dockutil__. From 3d2c72a6727cc5787a8a7d19eb22b9faf513ec28 Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 28 Sep 2022 13:45:38 +0200 Subject: [PATCH 73/96] Examples --- .../App browser-security SS.sh | 2 +- MDM/App-install/App browser-security Auto-install.sh | 2 +- MDM/App-install/App browser-security SS.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh index 3756e7a..8e59aba 100755 --- a/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App browser-security SS.sh @@ -5,7 +5,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" item="" # enter the software to install -# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg +# Examples: brave, duckduckgo, firefoxpkg, googlechromepkg, microsoftedge, opera # Dialog icon icon="" diff --git a/MDM/App-install/App browser-security Auto-install.sh b/MDM/App-install/App browser-security Auto-install.sh index dc06450..c45b568 100644 --- a/MDM/App-install/App browser-security Auto-install.sh +++ b/MDM/App-install/App browser-security Auto-install.sh @@ -5,7 +5,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" item="firefoxpkg" # enter the software to install -# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg +# Examples: brave, duckduckgo, firefoxpkg, googlechromepkg, microsoftedge, opera installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated by space diff --git a/MDM/App-install/App browser-security SS.sh b/MDM/App-install/App browser-security SS.sh index 81dc0d5..83c8b12 100644 --- a/MDM/App-install/App browser-security SS.sh +++ b/MDM/App-install/App browser-security SS.sh @@ -5,7 +5,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" item="" # enter the software to install -# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg +# Examples: brave, duckduckgo, firefoxpkg, googlechromepkg, microsoftedge, opera installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit NOTIFY=all" # Separated by space From c5ad2291e046c6d4bc22990ea63dc8f4ff3e898c Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 28 Sep 2022 15:24:02 +0200 Subject: [PATCH 74/96] VLC version from file name ``` # utils/assemble.sh vlc DEBUG=0 2022-09-28 15:22:49 : INFO : vlc : setting variable from argument DEBUG=0 2022-09-28 15:22:49 : REQ : vlc : ################## Start Installomator v. 10.0beta3, date 2022-09-28 2022-09-28 15:22:49 : INFO : vlc : ################## Version: 10.0beta3 2022-09-28 15:22:49 : INFO : vlc : ################## Date: 2022-09-28 2022-09-28 15:22:49 : INFO : vlc : ################## vlc 2022-09-28 15:22:49 : INFO : vlc : BLOCKING_PROCESS_ACTION=tell_user 2022-09-28 15:22:49 : INFO : vlc : NOTIFY=success 2022-09-28 15:22:49 : INFO : vlc : LOGGING=INFO 2022-09-28 15:22:49 : INFO : vlc : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-09-28 15:22:49 : INFO : vlc : Label type: dmg 2022-09-28 15:22:49 : INFO : vlc : archiveName: VLC.dmg 2022-09-28 15:22:49 : INFO : vlc : no blocking processes defined, using VLC as default 2022-09-28 15:22:49 : INFO : vlc : App(s) found: /Applications/VLC.app 2022-09-28 15:22:49 : INFO : vlc : found app at /Applications/VLC.app, version 3.0.17.3, on versionKey CFBundleShortVersionString 2022-09-28 15:22:49 : INFO : vlc : appversion: 3.0.17.3 2022-09-28 15:22:49 : INFO : vlc : Latest version of VLC is 3.0.17.3 2022-09-28 15:22:49 : INFO : vlc : There is no newer version available. 2022-09-28 15:22:49 : INFO : vlc : App not closed, so no reopen. 2022-09-28 15:22:49 : REQ : vlc : No newer version. 2022-09-28 15:22:49 : REQ : vlc : ################## End Installomator, exit code 0 ``` --- fragments/labels/vlc.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fragments/labels/vlc.sh b/fragments/labels/vlc.sh index 8fe2487..dae2c67 100644 --- a/fragments/labels/vlc.sh +++ b/fragments/labels/vlc.sh @@ -3,10 +3,11 @@ vlc) type="dmg" if [[ $(arch) == "arm64" ]]; then downloadURL=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-arm64.xml | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2 ) - appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-arm64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) + #appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-arm64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) elif [[ $(arch) == "i386" ]]; then downloadURL=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-intel64.xml | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2 ) - appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-intel64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) + #appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-intel64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) fi + appNewVersion=$(echo ${downloadURL} | sed -E 's/.*\/vlc-([0-9.]*).*\.dmg/\1/' ) expectedTeamID="75GAHG3SZQ" ;; From c955a69e47581913391bf30d13d70695f9cbb7c9 Mon Sep 17 00:00:00 2001 From: Theile Date: Thu, 29 Sep 2022 13:07:42 +0200 Subject: [PATCH 75/96] App-update scripts And added a bit to the README.md. --- .../App browser-security Auto-install.sh | 92 +++++++++++++++++++ MDM/App-update/App normal Auto-install.sh | 92 +++++++++++++++++++ MDM/README.md | 21 ++++- 3 files changed, 203 insertions(+), 2 deletions(-) create mode 100644 MDM/App-update/App browser-security Auto-install.sh create mode 100644 MDM/App-update/App normal Auto-install.sh diff --git a/MDM/App-update/App browser-security Auto-install.sh b/MDM/App-update/App browser-security Auto-install.sh new file mode 100644 index 0000000..211e564 --- /dev/null +++ b/MDM/App-update/App browser-security Auto-install.sh @@ -0,0 +1,92 @@ +#!/bin/sh + +# Update with Installomator if app exist + +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +item="microsoftedge" # enter the software to install +# Examples: brave, duckduckgo, firefoxpkg, googlechromepkg, microsoftedge, opera +appPath="/Applications/Microsoft Edge.app" +# Examples: Microsoft Edge.app, Brave Browser.app, DuckDuckGo.app, Google Chrome.app, Firefox.app, Opera.app + +installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "item" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 9.2.1 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $item" + +# Check if app is installed +# We only want this to run if it's already installed +if [ ! -e "${appPath}" ]; then + echo "App not found here:" + echo "${appPath}" + echo "Exiting." + exit 98 +fi +echo "${appPath} Found!" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Install software using Installomator +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || 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} -eq 0 ]] ; then + echo "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" +else + echo "ERROR installing ${item}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus + diff --git a/MDM/App-update/App normal Auto-install.sh b/MDM/App-update/App normal Auto-install.sh new file mode 100644 index 0000000..c2ac671 --- /dev/null +++ b/MDM/App-update/App normal Auto-install.sh @@ -0,0 +1,92 @@ +#!/bin/sh + +# Update with Installomator if app exist + +LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" + +item="" # enter the software to install +# Examples: cyberduck, handbrake, textmate, vlc +appPath="/Applications/Cyberduck.app" +# Examples: Cyberduck.app, Handbrake.app, Textmate.app, VLC.app + +installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user" # Separated by space + +# Other installomatorOptions: +# LOGGING=REQ +# LOGGING=DEBUG +# LOGGING=WARN +# BLOCKING_PROCESS_ACTION=ignore +# BLOCKING_PROCESS_ACTION=tell_user +# BLOCKING_PROCESS_ACTION=tell_user_then_quit +# BLOCKING_PROCESS_ACTION=prompt_user +# BLOCKING_PROCESS_ACTION=prompt_user_loop +# BLOCKING_PROCESS_ACTION=prompt_user_then_kill +# BLOCKING_PROCESS_ACTION=quit +# BLOCKING_PROCESS_ACTION=kill +# NOTIFY=all +# NOTIFY=success +# NOTIFY=silent +# IGNORE_APP_STORE_APPS=yes +# INSTALL=force +###################################################################### +# To be used as a script sent out from a MDM. +# Fill the variable "item" above with a label. +# Script will run this label through Installomator. +###################################################################### +# v. 9.2.1 : Better logging handling and installomatorOptions fix. +###################################################################### + +# Mark: Script +# PATH declaration +export PATH=/usr/bin:/bin:/usr/sbin:/sbin + +echo "$(date +%F\ %T) [LOG-BEGIN] $item" + +# Check if app is installed +# We only want this to run if it's already installed +if [ ! -e "${appPath}" ]; then + echo "App not found here:" + echo "${appPath}" + echo "Exiting." + exit 98 +fi +echo "${appPath} Found!" + +# 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=$! +caffexit () { + kill "$caffeinatepid" + pkill caffeinate + exit $1 +} + +# Install software using Installomator +cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || 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} -eq 0 ]] ; then + echo "${item} succesfully installed." + warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )" + echo "$warnOutput" +else + echo "ERROR installing ${item}. Exit code ${exitStatus}" + echo "$cmdOutput" + #errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )" + #echo "$errorOutput" +fi + +echo "[$(DATE)][LOG-END]" + +caffexit $exitStatus + diff --git a/MDM/README.md b/MDM/README.md index efa012c..2f0da26 100644 --- a/MDM/README.md +++ b/MDM/README.md @@ -1,8 +1,16 @@ # MDM scripts -This is a long list of various scripts for certain use in MDM solutions that cannot call a script internally with parameters, like Jamf Pro can do it. +This is a long list of various scripts for certain use in the various MDM solutions that we have used Installomator with. -So for Mosyle, Addigy, and Microsoft Endpoint Manager (Intune), these are know to be good. If these works in other MDMs, let us know. +There are two categories of MDMs. Either like Jamf Pro, that can contain the full script, and call that as a software installation (called policy in Jamf Pro). If the MDM cannot do that, it have to be able to run a script on the clients. That script can call Installomator on the client, and should therefore be locally installed. + +## “Jamf”-folder + +Here you have scripts for using swiftDialog as part of the Installomator installation. Showing progress in a small window. Separate [ReadMe-file](Jamf/ReadMe.md) in this folder. + +## Script capable MDM-solutions + +So for Mosyle, Addigy, and Microsoft Endpoint Manager (Intune), we have tested these scripts. If these works in other MDMs, let us know. Especially for Addigy, and maybe also for other MDMs, `condition`-scripts has been added if software installation will run on certain conditions. Also `prevention`-scripts has been added, if you manually need to eliminate the runnning of a script, this can be needed if you want to use the enrollment script, but don’t want it to run on the currently managed Macs Then you should sent out the `prevention`-script to make sure the file it creates is present on the Macs so the ordinary script will not do anything (it will detect this file and stop if found). @@ -80,3 +88,12 @@ What is also differentiated is what kind of app it is. Is it of the kind of brow All of the notes for the above scripts are the same for these. But these scripts utilize __swiftDialog__ to show a more live progress for the installation, and they also have a setting to use __dockutil__ to add the software to the Dock of the user. + +# App-update + +These script verifies if the app is already installed, before runnning Installomator. + +- App browser-security Auto-install.sh +- App normal Auto-install.sh + +These scripts only use Installomator, like “App-install”, but will check for the app to be installed first. Very usefull for Addigy and Microsoft. From e0222cfe4982f256eb394b064735ad46980c59e2 Mon Sep 17 00:00:00 2001 From: Theile Date: Thu, 29 Sep 2022 16:10:36 +0200 Subject: [PATCH 76/96] API call first, then fall back on home page url. --- fragments/functions.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index 74045da..812b297 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -162,18 +162,18 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name fi if [ -n "$archiveName" ]; then - #downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) - downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1)" + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") if [[ "$(echo $downloadURL | grep -ioE "https.*$archiveName")" == "" ]]; then - printlog "Trying GitHub API for download URL." - downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") + printlog "GitHub API not returning URL, trying https://github.com/$gitusername/$gitreponame/releases/latest." + #downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) + downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1)" fi else - #downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1) - downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then - printlog "Trying GitHub API for download URL." - downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") + printlog "GitHub API not returning URL, trying https://github.com/$gitusername/$gitreponame/releases/latest." + #downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1) + downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" fi fi if [ -z "$downloadURL" ]; then From d404e93365b9c936d328ea394b93bfd23276e6d4 Mon Sep 17 00:00:00 2001 From: Theile Date: Fri, 30 Sep 2022 09:22:29 +0200 Subject: [PATCH 77/96] adobeacrobatprodc, adobereaderdc --- fragments/labels/adobeacrobatprodc.sh | 8 ++++++ fragments/labels/adobereaderdc-install.sh | 27 +++++++++++++++++++ fragments/labels/adobereaderdc-update.sh | 32 +++++++++++++++++++++-- 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 fragments/labels/adobeacrobatprodc.sh create mode 100644 fragments/labels/adobereaderdc-install.sh diff --git a/fragments/labels/adobeacrobatprodc.sh b/fragments/labels/adobeacrobatprodc.sh new file mode 100644 index 0000000..308648f --- /dev/null +++ b/fragments/labels/adobeacrobatprodc.sh @@ -0,0 +1,8 @@ +adobeacrobatprodc) + name="Adobe Acrobat Pro DC" + type="pkgInDmg" + downloadURL="https://trials.adobe.com/AdobeProducts/APRO/Acrobat_HelpX/osx10/Acrobat_DC_Web_WWMUI.dmg" + expectedTeamID="JQ525L2MZD" + blockingProcesses=( "Acrobat Pro DC" ) + Company="Adobe" + ;; diff --git a/fragments/labels/adobereaderdc-install.sh b/fragments/labels/adobereaderdc-install.sh new file mode 100644 index 0000000..060e3cc --- /dev/null +++ b/fragments/labels/adobereaderdc-install.sh @@ -0,0 +1,27 @@ +adobereaderdc-install) + name="Adobe Acrobat Reader DC" + type="pkgInDmg" + printlog "Changing IFS for Adobe Reader" INFO + SAVEIFS=$IFS + IFS=$'\n' + versions=( $( curl -s https://www.adobe.com/devnet-docs/acrobatetk/tools/ReleaseNotesDC/index.html | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"| head -n 30) ) + local version + for version in $versions; do + version="${version//.}" + printlog "trying version: $version" INFO + local httpstatus=$(curl -X HEAD -s "https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/${version}/AcroRdrDC_${version}_MUI.dmg" --write-out "%{http_code}") + printlog "HTTP status for Adobe Reader full installer URL https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/${version}/AcroRdrDC_${version}_MUI.dmg is $httpstatus" DEBUG + if [[ "${httpstatus}" == "200" ]]; then + downloadURL="https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/${version}/AcroRdrDC_${version}_MUI.dmg" + unset httpstatus + break + fi + done + unset version + IFS=$SAVEIFS + appNewVersion=$i + expectedTeamID="JQ525L2MZD" + blockingProcesses=( "AdobeReader" ) + Company="Adobe" + PatchName="AcrobatReader" + ;; diff --git a/fragments/labels/adobereaderdc-update.sh b/fragments/labels/adobereaderdc-update.sh index a409cf5..1637402 100644 --- a/fragments/labels/adobereaderdc-update.sh +++ b/fragments/labels/adobereaderdc-update.sh @@ -1,9 +1,37 @@ adobereaderdc-update) name="Adobe Acrobat Reader DC" type="pkgInDmg" - downloadURL=$(adobecurrent=`curl --fail --silent https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt | tr -d '.'` && echo https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/"$adobecurrent"/AcroRdrDC_"$adobecurrent"_MUI.dmg) + if [[ -d "/Applications/Adobe Acrobat Reader DC.app" ]]; then + mkdir -p "/Library/Application Support/Adobe/Acrobat/11.0" + defaults write "/Library/Application Support/Adobe/Acrobat/11.0/com.adobe.Acrobat.InstallerOverrides.plist" ReaderAppPath "/Applications/Adobe Acrobat Reader DC.app" + if ! [[ `defaults read "/Applications/Adobe Acrobat Reader DC.app/Contents/Resources/AcroLocale.plist"` ]]; then + printlog "Missing locale data, this will cause the updater to fail. Deleting Adobe Acrobat Reader DC.app and installing fresh." + rm -Rf "/Applications/Adobe Acrobat Reader DC.app" + $0 $1 $2 $3 adobereaderdc-install $5 $6 $7 $8 $9 ${10} ${11} + fi + fi + adobecurrent=$(curl -sL https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt | tr -d '.') + if [[ "${adobecurrent}" != <-> ]]; then + printlog "Got an invalid response for the Adobe Reader Current Version: ${adobecurrent}" ERROR + printlog "################## End $APPLICATION \n\n" INFO + exit 50 + fi + downloadURL=$(echo https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/"$adobecurrent"/AcroRdrDCUpd"$adobecurrent"_MUI.dmg) + reader_preinstall() { + if pgrep -a "AdobeReader" >/dev/null 2>&1; then + printlog "AdobeReader is still running, forcefully killing." WARN + killall AdobeReader + fi + } + preinstall="reader_preinstall" + updateTool="/usr/local/bin/RemoteUpdateManager" + updateToolArguments=( --productVersions=RDR ) appNewVersion=$(curl -s https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt) - #appNewVersion=$(curl -s -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15)" https://get.adobe.com/reader/ | grep ">Version" | sed -E 's/.*Version 20([0-9.]*)<.*/\1/g') # credit: Søren Theilgaard (@theilgaard) + updateToolLog="/Users/$currentUser/Library/Logs/RemoteUpdateManager.log" + updateToolLogDateFormat="%m/%d/%y %H:%M:%S" expectedTeamID="JQ525L2MZD" blockingProcesses=( "AdobeReader" ) + Company=Adobe + PatchName=AcrobatReader + PatchSkip="YES" ;; From 3f41926cf92e552ac6ebeed2109a4e91835800d9 Mon Sep 17 00:00:00 2001 From: Theile Date: Fri, 30 Sep 2022 10:14:13 +0200 Subject: [PATCH 78/96] adobecreativeclouddesktop and adobereaderdc-update Fixing #694 and fixing #687 --- fragments/labels/adobecreativeclouddesktop.sh | 16 +++++++++------- fragments/labels/adobereaderdc-update.sh | 13 ++++++++++--- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/fragments/labels/adobecreativeclouddesktop.sh b/fragments/labels/adobecreativeclouddesktop.sh index c83da57..e12b911 100644 --- a/fragments/labels/adobecreativeclouddesktop.sh +++ b/fragments/labels/adobecreativeclouddesktop.sh @@ -1,22 +1,24 @@ adobecreativeclouddesktop) name="Adobe Creative Cloud" + appName="Install.app" type="dmg" if pgrep -q "Adobe Installer"; then printlog "Adobe Installer is running, not a good time to update." WARN printlog "################## End $APPLICATION \n\n" INFO exit 75 fi - adobeurl="https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" - if [[ $(arch) == "arm64" ]]; then - downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'macarm64')][contains(text(),'Download')]/@href)" - 2> /dev/null) - elif [[ $(arch) == "i386" ]]; then - downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'osx10')][contains(text(),'Download')]/@href)" - 2> /dev/null) + if [[ "$(arch)" == "arm64" ]]; then + downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o 'https.*macarm64.*dmg' | head -1 | cut -d '"' -f1) + else + downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o 'https.*osx10.*dmg' | head -1 | cut -d '"' -f1) fi - appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2) - #appNewVersion=$(echo "$downloadURL" | grep -o '[^x]*$' | cut -d '.' -f 1 | sed 's/_/\./g') + #appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2) + appNewVersion=$(echo $downloadURL | grep -o '[^x]*$' | cut -d '.' -f 1 | sed 's/_/\./g') + targetDir="/Applications/Utilities/Adobe Creative Cloud/ACC/" installerTool="Install.app" CLIInstaller="Install.app/Contents/MacOS/Install" CLIArguments=(--mode=silent) expectedTeamID="JQ525L2MZD" + blockingProcesses=( "Creative Cloud" ) Company="Adobe" ;; diff --git a/fragments/labels/adobereaderdc-update.sh b/fragments/labels/adobereaderdc-update.sh index 1637402..7a81c57 100644 --- a/fragments/labels/adobereaderdc-update.sh +++ b/fragments/labels/adobereaderdc-update.sh @@ -2,12 +2,19 @@ adobereaderdc-update) name="Adobe Acrobat Reader DC" type="pkgInDmg" if [[ -d "/Applications/Adobe Acrobat Reader DC.app" ]]; then + printlog "Found /Applications/Adobe Acrobat Reader DC.app" mkdir -p "/Library/Application Support/Adobe/Acrobat/11.0" defaults write "/Library/Application Support/Adobe/Acrobat/11.0/com.adobe.Acrobat.InstallerOverrides.plist" ReaderAppPath "/Applications/Adobe Acrobat Reader DC.app" - if ! [[ `defaults read "/Applications/Adobe Acrobat Reader DC.app/Contents/Resources/AcroLocale.plist"` ]]; then - printlog "Missing locale data, this will cause the updater to fail. Deleting Adobe Acrobat Reader DC.app and installing fresh." + if ! defaults read "/Applications/Adobe Acrobat Reader DC.app/Contents/Resources/AcroLocale.plist" ; then + printlog "Missing locale data, this will cause the updater to fail. Deleting Adobe Acrobat Reader DC.app and installing fresh." WARN rm -Rf "/Applications/Adobe Acrobat Reader DC.app" - $0 $1 $2 $3 adobereaderdc-install $5 $6 $7 $8 $9 ${10} ${11} + if [[ $1 == "/" ]]; then + printlog "Running through Jamf: $0." INFO + $0 $1 $2 $3 adobereaderdc-install ${5} ${6} ${7} ${8} ${9} ${10} ${11} + else + printlog "Installomator running locally: $0." INFO + $0 adobereaderdc-install ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} + fi fi fi adobecurrent=$(curl -sL https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt | tr -d '.') From feedc86a0afd640fe7d8522683b5d58f198a8045 Mon Sep 17 00:00:00 2001 From: Theile Date: Fri, 30 Sep 2022 10:57:04 +0200 Subject: [PATCH 79/96] Works with version 9 and 10 comment. --- MDM/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MDM/README.md b/MDM/README.md index 2f0da26..0360ffb 100644 --- a/MDM/README.md +++ b/MDM/README.md @@ -14,6 +14,8 @@ So for Mosyle, Addigy, and Microsoft Endpoint Manager (Intune), we have tested t Especially for Addigy, and maybe also for other MDMs, `condition`-scripts has been added if software installation will run on certain conditions. Also `prevention`-scripts has been added, if you manually need to eliminate the runnning of a script, this can be needed if you want to use the enrollment script, but don’t want it to run on the currently managed Macs Then you should sent out the `prevention`-script to make sure the file it creates is present on the Macs so the ordinary script will not do anything (it will detect this file and stop if found). +_The scripts utilizing __swiftDialog__ requires version 10 of __Installomator__, but will work with version 9. If runnning on version 9 it will set `NOTIFY=all` and use __Installomator__ notifications for showing progress, where as on version 10 it will be `NOTIFY=silent` as __swiftDialog__ is used instead._ + ### Shortenings - SS — Self Service — scripts designed for use through a Self Service catalog From dd3ac338b32a59df633def9070e7b992f20892c3 Mon Sep 17 00:00:00 2001 From: Theile Date: Fri, 30 Sep 2022 13:41:20 +0200 Subject: [PATCH 80/96] Examples --- .../App service SS.sh | 2 +- MDM/App-install/App service Auto-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh b/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh index e441c91..67d1f56 100644 --- a/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh +++ b/MDM/App-install SS with swiftDialog and dockutil/App service SS.sh @@ -5,7 +5,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" item="" # enter the software to install -# Examples: applenyfonts, applesfarabic, applesfcompact, applesfmono, applesfpro, applesfsymbols, dialog, dockutil, knockknock, lulu, nomad, nudge, shield, supportapp, wordservice, xcreds, xink +# Examples: applenyfonts, applesfarabic, applesfcompact, applesfmono, applesfpro, applesfsymbols, desktoppr, dialog, dockutil, knockknock, lulu, nomad, nudge, shield, supportapp, wordservice, xcreds, xink # Dialog icon icon="" diff --git a/MDM/App-install/App service Auto-install.sh b/MDM/App-install/App service Auto-install.sh index ce282a4..aa7165e 100644 --- a/MDM/App-install/App service Auto-install.sh +++ b/MDM/App-install/App service Auto-install.sh @@ -5,7 +5,7 @@ LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1" item="dockutil" # enter the software to install -# Examples: applenyfonts, applesfarabic, applesfcompact, applesfmono, applesfpro, applesfsymbols, dialog, dockutil, knockknock, lulu, nomad, nudge, shield, supportapp, wordservice, xcreds, xink +# Examples: applenyfonts, applesfarabic, applesfcompact, applesfmono, applesfpro, applesfsymbols, desktoppr, dialog, dockutil, knockknock, lulu, nomad, nudge, shield, supportapp, wordservice, xcreds, xink installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated by space From be62fa9895b9d58fde8ee5c5592eac2e64b4101f Mon Sep 17 00:00:00 2001 From: dnikles Date: Fri, 30 Sep 2022 11:07:30 -0400 Subject: [PATCH 81/96] check for arch previous version of label was downloading the arm64 version every time --- fragments/labels/audacity.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fragments/labels/audacity.sh b/fragments/labels/audacity.sh index a5868d3..3a49708 100644 --- a/fragments/labels/audacity.sh +++ b/fragments/labels/audacity.sh @@ -1,7 +1,13 @@ audacity) name="Audacity" type="dmg" - downloadURL=$(downloadURLFromGit audacity audacity) + if [[ $(arch) == "arm64" ]]; then + archiveName="audacity-macOS-[0-9.]*-arm64.dmg" + downloadURL=$(downloadURLFromGit audacity audacity) + elif [[ $(arch) == "i386" ]]; then + archiveName="audacity-macOS-[0-9.]*-x86_64.dmg" + downloadURL=$(downloadURLFromGit audacity audacity) + fi appNewVersion=$(versionFromGit audacity audacity) expectedTeamID="AWEYX923UX" ;; From 2c378360c4c76e4b88fbdeb3c374ca0f9e9a9824 Mon Sep 17 00:00:00 2001 From: Fletcher Salesky Date: Fri, 30 Sep 2022 13:07:25 -0700 Subject: [PATCH 82/96] Omit xpath error lines from output --- fragments/labels/egnytecore.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/egnytecore.sh b/fragments/labels/egnytecore.sh index c22b22e..b7565fa 100644 --- a/fragments/labels/egnytecore.sh +++ b/fragments/labels/egnytecore.sh @@ -2,8 +2,8 @@ egnytecore) name="Egnyte Core" appName="Egnyte.app" type="dmg" - downloadURL=$(curl -fs "https://egnyte-cdn.egnyte.com/desktopapp/mac/en-us/versions/default.xml" | xpath '(//rss/channel/item/enclosure/@url)[1]' | cut -d '"' -f 2) - appNewVersion=$(curl -fs "https://egnyte-cdn.egnyte.com/desktopapp/mac/en-us/versions/default.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' | cut -d '"' -f 2) + downloadURL=$(curl -fs "https://egnyte-cdn.egnyte.com/desktopapp/mac/en-us/versions/default.xml" | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f 2) + appNewVersion=$(curl -fs "https://egnyte-cdn.egnyte.com/desktopapp/mac/en-us/versions/default.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f 2) expectedTeamID="FELUD555VC" blockingProcesses=( NONE ) ;; From ee02bee37c87bb7ef406c91407c0b123f33cecbc Mon Sep 17 00:00:00 2001 From: Theile Date: Fri, 30 Sep 2022 22:12:09 +0200 Subject: [PATCH 83/96] 10.0beta3, 2022-09-30 --- Installomator.sh | 373 +++++++++++++++++++++++++++++++++++++++++------ Labels.txt | 24 ++- 2 files changed, 353 insertions(+), 44 deletions(-) diff --git a/Installomator.sh b/Installomator.sh index 025a68c..a43384e 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -322,8 +322,8 @@ if [[ $(/usr/bin/arch) == "arm64" ]]; then rosetta2=no fi fi -VERSION="10.0beta2" -VERSIONDATE="2022-09-02" +VERSION="10.0beta3" +VERSIONDATE="2022-09-30" # MARK: Functions @@ -489,11 +489,19 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name fi if [ -n "$archiveName" ]; then - #downloadURL=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") - downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") + if [[ "$(echo $downloadURL | grep -ioE "https.*$archiveName")" == "" ]]; then + printlog "GitHub API not returning URL, trying https://github.com/$gitusername/$gitreponame/releases/latest." + #downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) + downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1)" + fi else - #downloadURL=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") - downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1) + downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }") + if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + printlog "GitHub API not returning URL, trying https://github.com/$gitusername/$gitreponame/releases/latest." + #downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1) + downloadURL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.$filetype" | head -1)" + fi fi if [ -z "$downloadURL" ]; then cleanupAndExit 14 "could not retrieve download URL for $gitusername/$gitreponame" ERROR @@ -612,6 +620,10 @@ getAppVersion() { printlog "Replacing App Store apps, no matter the version" WARN appversion=0 else + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "wait" "Already installed from App Store. Not replaced." + sleep 4 + fi cleanupAndExit 23 "App previously installed from App Store, and we respect that" ERROR fi fi @@ -789,6 +801,10 @@ installAppWithPath() { # $1: path to app to install in $targetDir printlog "notifying" displaynotification "$message" "No update for $name!" fi + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "wait" "Latest version already installed..." + sleep 2 + fi cleanupAndExit 0 "No new version to install" REG else printlog "Using force to install anyway." @@ -955,6 +971,10 @@ installFromPKG() { printlog "notifying" displaynotification "$message" "No update for $name!" fi + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "wait" "Latest version already installed..." + sleep 2 + fi cleanupAndExit 0 "No new version to install" REQ else printlog "Using force to install anyway." @@ -1557,6 +1577,15 @@ remotixagent) versionKey="CFBundleVersion" appNewVersion=$(curl -fsIL "${downloadURL}" | grep -i "^location" | sed -E 's/.*\/[a-zA-Z]*-[0-9.]*-([0-9.]*)\.pkg/\1/g') expectedTeamID="H629V387SY" + blockingProcesses=( NONE ) + ;; +adobeacrobatprodc) + name="Adobe Acrobat Pro DC" + type="pkgInDmg" + downloadURL="https://trials.adobe.com/AdobeProducts/APRO/Acrobat_HelpX/osx10/Acrobat_DC_Web_WWMUI.dmg" + expectedTeamID="JQ525L2MZD" + blockingProcesses=( "Acrobat Pro DC" ) + Company="Adobe" ;; adobebrackets) name="Brackets" @@ -1577,30 +1606,98 @@ adobeconnect) ;; adobecreativeclouddesktop) name="Adobe Creative Cloud" - #appName="Install.app" + appName="Install.app" type="dmg" - adobeurl="https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" - if [[ $(arch) == "arm64" ]]; then - downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'osx10')][contains(text(),'Download')]/@href)" - 2> /dev/null) - elif [[ $(arch) == "i386" ]]; then - downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'macarm64')][contains(text(),'Download')]/@href)" - 2> /dev/null) + if pgrep -q "Adobe Installer"; then + printlog "Adobe Installer is running, not a good time to update." WARN + printlog "################## End $APPLICATION \n\n" INFO + exit 75 fi - #downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*dmg" | head -1) - appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2) + if [[ "$(arch)" == "arm64" ]]; then + downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o 'https.*macarm64.*dmg' | head -1 | cut -d '"' -f1) + else + downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o 'https.*osx10.*dmg' | head -1 | cut -d '"' -f1) + fi + #appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2) + appNewVersion=$(echo $downloadURL | grep -o '[^x]*$' | cut -d '.' -f 1 | sed 's/_/\./g') + targetDir="/Applications/Utilities/Adobe Creative Cloud/ACC/" installerTool="Install.app" CLIInstaller="Install.app/Contents/MacOS/Install" CLIArguments=(--mode=silent) expectedTeamID="JQ525L2MZD" + blockingProcesses=( "Creative Cloud" ) Company="Adobe" ;; +adobereaderdc-install) + name="Adobe Acrobat Reader DC" + type="pkgInDmg" + printlog "Changing IFS for Adobe Reader" INFO + SAVEIFS=$IFS + IFS=$'\n' + versions=( $( curl -s https://www.adobe.com/devnet-docs/acrobatetk/tools/ReleaseNotesDC/index.html | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"| head -n 30) ) + local version + for version in $versions; do + version="${version//.}" + printlog "trying version: $version" INFO + local httpstatus=$(curl -X HEAD -s "https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/${version}/AcroRdrDC_${version}_MUI.dmg" --write-out "%{http_code}") + printlog "HTTP status for Adobe Reader full installer URL https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/${version}/AcroRdrDC_${version}_MUI.dmg is $httpstatus" DEBUG + if [[ "${httpstatus}" == "200" ]]; then + downloadURL="https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/${version}/AcroRdrDC_${version}_MUI.dmg" + unset httpstatus + break + fi + done + unset version + IFS=$SAVEIFS + appNewVersion=$i + expectedTeamID="JQ525L2MZD" + blockingProcesses=( "AdobeReader" ) + Company="Adobe" + PatchName="AcrobatReader" + ;; adobereaderdc-update) name="Adobe Acrobat Reader DC" type="pkgInDmg" - downloadURL=$(adobecurrent=`curl --fail --silent https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt | tr -d '.'` && echo https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/"$adobecurrent"/AcroRdrDC_"$adobecurrent"_MUI.dmg) + if [[ -d "/Applications/Adobe Acrobat Reader DC.app" ]]; then + printlog "Found /Applications/Adobe Acrobat Reader DC.app" + mkdir -p "/Library/Application Support/Adobe/Acrobat/11.0" + defaults write "/Library/Application Support/Adobe/Acrobat/11.0/com.adobe.Acrobat.InstallerOverrides.plist" ReaderAppPath "/Applications/Adobe Acrobat Reader DC.app" + if ! defaults read "/Applications/Adobe Acrobat Reader DC.app/Contents/Resources/AcroLocale.plist" ; then + printlog "Missing locale data, this will cause the updater to fail. Deleting Adobe Acrobat Reader DC.app and installing fresh." WARN + rm -Rf "/Applications/Adobe Acrobat Reader DC.app" + if [[ $1 == "/" ]]; then + printlog "Running through Jamf: $0." INFO + $0 $1 $2 $3 adobereaderdc-install ${5} ${6} ${7} ${8} ${9} ${10} ${11} + else + printlog "Installomator running locally: $0." INFO + $0 adobereaderdc-install ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} + fi + fi + fi + adobecurrent=$(curl -sL https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt | tr -d '.') + if [[ "${adobecurrent}" != <-> ]]; then + printlog "Got an invalid response for the Adobe Reader Current Version: ${adobecurrent}" ERROR + printlog "################## End $APPLICATION \n\n" INFO + exit 50 + fi + downloadURL=$(echo https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/"$adobecurrent"/AcroRdrDCUpd"$adobecurrent"_MUI.dmg) + reader_preinstall() { + if pgrep -a "AdobeReader" >/dev/null 2>&1; then + printlog "AdobeReader is still running, forcefully killing." WARN + killall AdobeReader + fi + } + preinstall="reader_preinstall" + updateTool="/usr/local/bin/RemoteUpdateManager" + updateToolArguments=( --productVersions=RDR ) appNewVersion=$(curl -s https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt) - #appNewVersion=$(curl -s -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15)" https://get.adobe.com/reader/ | grep ">Version" | sed -E 's/.*Version 20([0-9.]*)<.*/\1/g') # credit: Søren Theilgaard (@theilgaard) + updateToolLog="/Users/$currentUser/Library/Logs/RemoteUpdateManager.log" + updateToolLogDateFormat="%m/%d/%y %H:%M:%S" expectedTeamID="JQ525L2MZD" blockingProcesses=( "AdobeReader" ) + Company=Adobe + PatchName=AcrobatReader + PatchSkip="YES" ;; adobereaderdc|\ adobereaderdc-install) @@ -1785,6 +1882,26 @@ aquaskk) appNewVersion=$(versionFromGit codefirst aquaskk) expectedTeamID="FPZK4WRGW7" ;; +archiwareb2go) + name="P5 Workstation" + type="pkgInDmg" + packageID="com.archiware.presstore" + appNewVersion=$(curl -sf https://www.archiware.com/download-p5 | grep -m 1 "ARCHIWARE P5 Version" | sed "s|.*Version \(.*\) -.*|\\1|") + downloadURL=$(appNrVersion=`sed 's/[^0-9]//g' <<< $appNewVersion` && echo https://p5-downloads.s3.amazonaws.com/awpst"$appNrVersion"-darwin.dmg) + pkgName=$(appNrVersion=`sed 's/[^0-9]//g' <<< $appNewVersion` && echo P5-Workstation-"$appNrVersion"-Install.pkg) + expectedTeamID="5H5EU6F965" + # blockingProcesses=( nsd ) + ;; +archiwarepst) + name="P5" + type="pkgInDmg" + packageID="com.archiware.presstore" + appNewVersion=$(curl -sf https://www.archiware.com/download-p5 | grep -m 1 "ARCHIWARE P5 Version" | sed "s|.*Version \(.*\) -.*|\\1|") + downloadURL=$(appNrVersion=`sed 's/[^0-9]//g' <<< $appNewVersion` && echo https://p5-downloads.s3.amazonaws.com/awpst"$appNrVersion"-darwin.dmg) + pkgName=$(appNrVersion=`sed 's/[^0-9]//g' <<< $appNewVersion` && echo P5-"$appNrVersion"-Install.pkg) + expectedTeamID="5H5EU6F965" + # blockingProcesses=( nsd ) + ;; arq7) name="Arq7" type="pkg" @@ -1825,7 +1942,13 @@ atom) audacity) name="Audacity" type="dmg" - downloadURL=$(downloadURLFromGit audacity audacity) + if [[ $(arch) == "arm64" ]]; then + archiveName="audacity-macOS-[0-9.]*-arm64.dmg" + downloadURL=$(downloadURLFromGit audacity audacity) + elif [[ $(arch) == "i386" ]]; then + archiveName="audacity-macOS-[0-9.]*-x86_64.dmg" + downloadURL=$(downloadURLFromGit audacity audacity) + fi appNewVersion=$(versionFromGit audacity audacity) expectedTeamID="AWEYX923UX" ;; @@ -1942,7 +2065,14 @@ bettertouchtool) appNewVersion=$(curl -fs https://updates.folivora.ai/bettertouchtool_release_notes.html | grep BetterTouchTool | head -n 2 | tail -n 1 | sed -E 's/.* ([0-9\.]*) .*/\1/g') expectedTeamID="DAFVSXZ82P" ;; -bitwarden) +bitrix24) + name="Bitrix24" + type="dmg" + archiveName="bitrix24_desktop.dmg" + downloadURL="https://dl.bitrix24.com/b24/bitrix24_desktop.dmg" + expectedTeamID="5B3T3A994N" + blockingProcesses=( "Bitrix24" ) + ;;bitwarden) name="Bitwarden" type="dmg" downloadURL=$(downloadURLFromGit bitwarden desktop ) @@ -2111,12 +2241,37 @@ carboncopycloner) appNewVersion=$(sed -E 's/.*-([0-9.]*)\.zip/\1/g' <<< $downloadURL | sed 's/\.[^.]*$//') expectedTeamID="L4F2DED5Q7" ;; -chatwork) +charles) + name="Charles" + type="dmg" + appNewVersion=$(curl -fs https://www.charlesproxy.com/download/latest-release/ | sed -nE 's/.*version.*value="([^"]*).*/\1/p') + downloadURL="https://www.charlesproxy.com/assets/release/$appNewVersion/charles-proxy-$appNewVersion.dmg" + expectedTeamID="9A5PCU4FSD" + ;;chatwork) name="Chatwork" type="dmg" downloadURL="https://desktop-app.chatwork.com/installer/Chatwork.dmg" expectedTeamID="H34A3H2Y54" ;; +chronoagent) + name="ChronoAgent" + type="pkgInDmg" + # packageID="com.econtechnologies.preference.chronoagent" + # versionKey="CFBundleVersion" + # None of the above can read out the installed version + releaseURL="https://www.econtechnologies.com/UC/updatecheck.php?prod=ChronoAgent&lang=en&plat=mac&os=10.14.1&hw=i64&req=1&vers=#" + appNewVersion=$(curl -sf $releaseURL | sed -r 's/.*VERSION=([^<]+).*/\1/') + downloadURL="https://downloads.econtechnologies.com/CA_Mac_Download.dmg" + expectedTeamID="9U697UM7YX" + ;; +chronosync) + name="ChronoSync" + type="pkgInDmg" + releaseURL="https://www.econtechnologies.com/UC/updatecheck.php?prod=ChronoSync&lang=en&plat=mac&os=10.14.1&hw=i64&req=1&vers=#" + appNewVersion=$(curl -sf $releaseURL | sed -r 's/.*VERSION=([^<]+).*/\1/') + downloadURL="https://downloads.econtechnologies.com/CS4_Download.dmg" + expectedTeamID="9U697UM7YX" + ;; cisdem-documentreader) name="cisdem-documentreader" type="dmg" @@ -2276,6 +2431,17 @@ cyberduck) appNewVersion=$(curl -fs https://version.cyberduck.io/changelog.rss | xpath '//rss/channel/item/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 ) expectedTeamID="G69SCX94XU" ;; +cytoscape) + name="Cytoscape" + #appName="Cytoscape Installer.app" + type="dmg" + downloadURL="$(downloadURLFromGit cytoscape cytoscape)" + appNewVersion="$(versionFromGit cytoscape cytoscape)" + installerTool="Cytoscape Installer.app" + CLIInstaller="Cytoscape Installer.app/Contents/MacOS/JavaApplicationStub" + CLIArguments=(-q) + expectedTeamID="35LDCJ33QT" + ;; daisydisk) name="DaisyDisk" type="zip" @@ -2444,10 +2610,10 @@ duckduckgo) name="DuckDuckGo" type="dmg" #downloadURL="https://staticcdn.duckduckgo.com/macos-desktop-browser/duckduckgo.dmg" - #downloadURL=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@url)[last()]' 2>/dev/null | cut -d '"' -f2) - downloadURL=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2) - #appNewVersion=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@sparkle:version)[last()]' 2>/dev/null | cut -d '"' -f2) - appNewVersion=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/sparkle:shortVersionString)[1]' 2>/dev/null | cut -d ">" -f2 | cut -d "<" -f1) + downloadURL=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@url)[last()]' 2>/dev/null | cut -d '"' -f2) + #downloadURL=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2) + appNewVersion=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/enclosure/@sparkle:version)[last()]' 2>/dev/null | cut -d '"' -f2) + #appNewVersion=$(curl -fs https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast.xml | xpath '(//rss/channel/item/sparkle:shortVersionString)[1]' 2>/dev/null | cut -d ">" -f2 | cut -d "<" -f1) expectedTeamID="HKE973VLUW" ;; duodevicehealth) @@ -2603,6 +2769,14 @@ figma) appNewVersion="$(curl -fsL https://desktop.figma.com/mac/RELEASE.json | awk -F '"' '{ print $8 }')" expectedTeamID="T8RA8NE3B7" ;; +filemakerpro) + name="FileMaker Pro" + type="dmg" + versionKey="BuildVersion" + downloadURL=$(curl -fs https://www.filemaker.com/redirects/ss.txt | grep '\"PRO..MAC\"' | tail -1 | sed "s|.*url\":\"\(.*\)\".*|\\1|") + appNewVersion=$(curl -fs https://www.filemaker.com/redirects/ss.txt | grep '\"PRO..MAC\"' | tail -1 | sed "s|.*fmp_\(.*\).dmg.*|\\1|") + expectedTeamID="J6K4T76U7W" + ;; filezilla) name="FileZilla" type="tbz" @@ -2796,6 +2970,20 @@ fsmonitor) downloadURL=$(curl --location --fail --silent "https://fsmonitor.com/FSMonitor/Archives/appcast2.xml" | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2) expectedTeamID="V85GBYB7B9" ;; +fujifilmwebcam) + name="FUJIFILM X Webcam 2" + type="pkg" + downloadURL=$(curl -fs "https://fujifilm-x.com/en-us/support/download/software/x-webcam/" | grep "https.*pkg" | sed -E 's/.*(https:\/\/dl.fujifilm-x\.com\/support\/software\/.*\.pkg[^\<]).*/\1/g' | sed -e 's/^"//' -e 's/"$//') + appNewVersion=$( echo “${downloadURL}” | sed -E 's/.*XWebcamIns([0-9]*).*/\1/g' | sed -E 's/([0-9])([0-9]).*/\1\.\2/g') + expectedTeamID="34LRP8AV2M" + ;; +gfxcardstatus) + name="gfxCardStatus" + type="zip" + downloadURL="$(downloadURLFromGit codykrieger gfxCardStatus)" + appNewVersion="$(versionFromGit codykrieger gfxCardStatus)" + expectedTeamID="LF22FTQC25" + ;; gimp) name="GIMP-2.10" type="dmg" @@ -2999,6 +3187,20 @@ hazel) appNewVersion=$(curl -fsI https://www.noodlesoft.com/Products/Hazel/download | grep -i "^location" | awk '{print $2}' | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g') expectedTeamID="86Z3GCJ4MF" ;; +horos) + name="Horos" + type="dmg" + versionKey="CFBundleGetInfoString" + appNewVersion=$(curl -fs https://github.com/horosproject/horos/blob/horos/Horos/Info.plist | grep -A 4 "CFBundleGetInfoString" | tail -1 | sed -r 's/.*Horos v([^<]+).*/\1/' | sed 's/ //g') + if [[ $(arch) == "arm64" ]]; then + downloadURL="https://horosproject.org/horos-content/Horos"$appNewVersion"_Apple.dmg" + TeamID="8NDFEW7285" + elif [[ $(arch) == "i386" ]]; then + downloadURL="https://horosproject.org/horos-content/Horos"$appNewVersion".dmg" + TeamID="TPT6TVH8UY" + fi + expectedTeamID=$TeamID + ;; houdahspot) name="HoudahSpot" type="zip" @@ -3430,6 +3632,13 @@ lastpass) expectedTeamID="N24REP3BMN" Company="Marvasol, Inc DBA LastPass" ;; +latexit) + name="LaTeXiT" + type="dmg" + downloadURL="$(curl -fs "https://pierre.chachatelier.fr/latexit/downloads/latexit-sparkle-en.rss" | xpath '(//rss/channel/item/enclosure/@url)[last()]' 2>/dev/null | cut -d '"' -f 2)" + appNewVersion="$(curl -fs "https://pierre.chachatelier.fr/latexit/downloads/latexit-sparkle-en.rss" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[last()]' 2>/dev/null | cut -d '"' -f 2)" + expectedTeamID="7SFX84GNR7" + ;; launchbar) name="LaunchBar" type="dmg" @@ -3454,11 +3663,14 @@ libreoffice) name="LibreOffice" type="dmg" if [[ $(arch) == "arm64" ]]; then - arch_type="aarch64" + releaseURL="https://downloadarchive.documentfoundation.org/libreoffice/old/latest/mac/aarch64/" + appNewVersion=$(curl -sf $releaseURL | grep -m 1 "_MacOS_aarch64.dmg" | sed "s|.*LibreOffice_\(.*\)_MacOS.*|\\1|") + downloadURL="https://downloadarchive.documentfoundation.org/libreoffice/old/latest/mac/aarch64/LibreOffice_"$appNewVersion"_MacOS_aarch64.dmg" + elif [[ $(arch) == "i386" ]]; then + releaseURL="https://downloadarchive.documentfoundation.org/libreoffice/old/latest/mac/x86_64/" + appNewVersion=$(curl -sf $releaseURL | grep -m 1 "_MacOS_x86-64.dmg" | sed "s|.*LibreOffice_\(.*\)_MacOS.*|\\1|") + downloadURL="https://downloadarchive.documentfoundation.org/libreoffice/old/latest/mac/x86_64/LibreOffice_"$appNewVersion"_MacOS_x86-64.dmg" fi - libreoffice_latest_version="$(curl -Ls https://www.libreoffice.org/download/download-libreoffice/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)" - downloadURL="https://download.documentfoundation.org/libreoffice/stable/${libreoffice_latest_version}/mac/${arch_type:-x86_64}/LibreOffice_${libreoffice_latest_version}_MacOS_${arch_type:-x86-64}.dmg" - appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g') expectedTeamID="7P5S3ZLCN7" blockingProcesses=( soffice ) ;; @@ -4115,7 +4327,6 @@ nomad) downloadURL="https://files.nomad.menu/NoMAD.pkg" appNewVersion=$(curl -fs https://nomad.menu/support/ | grep "NoMAD Downloads" | sed -E 's/.*Current Version ([0-9\.]*)<.*/\1/g') expectedTeamID="VRPY9KHGX6" - blockingProcesses=( NONE ) ;; nomadlogin) # credit: Søren Theilgaard (@theilgaard) @@ -4148,10 +4359,21 @@ notion) nudge) name="Nudge" type="pkg" + archiveName="Nudge-[0-9.]*.pkg" downloadURL=$(downloadURLFromGit macadmins Nudge ) appNewVersion=$(versionFromGit macadmins Nudge ) expectedTeamID="9GQZ7KUFR6" - archiveName="Nudge-[0-9.]*.pkg" + + ;; +nudgesuite) + name="Nudge Suite" + appName="Nudge.app" + type="pkg" + archiveName="Nudge_Suite-[0-9.]*.pkg" + downloadURL=$(downloadURLFromGit macadmins Nudge ) + appNewVersion=$(versionFromGit macadmins Nudge ) + expectedTeamID="9GQZ7KUFR6" + blockingProcesses=( "Nudge" ) ;; nvivo) name="NVivo" @@ -4162,10 +4384,15 @@ nvivo) blockingProcesses=( NVivo NVivoHelper ) ;; obs) - # credit: Gabe Marchan (gabemarchan.com - @darklink87) name="OBS" type="dmg" - downloadURL=$(curl -fs "https://obsproject.com/download" | awk -F '"' "/dmg/ {print \$10}") + if [[ $(arch) == "arm64" ]]; then + archiveName="obs-studio-[0-9.]*-macos-arm64.dmg" + elif [[ $(arch) == "i386" ]]; then + archiveName="obs-studio-[0-9.]*-macos-x86_64.dmg" + fi + downloadURL=$(downloadURLFromGit obsproject obs-studio ) + appNewVersion=$(versionFromGit obsproject obs-studio ) expectedTeamID="2MMRE5MTB8" ;; obsidian) @@ -4283,7 +4510,13 @@ opera) versionKey="CFBundleVersion" expectedTeamID="A2P9LX4JPN" ;; -ottomatic) +origin) + name="Origin" + type="dmg" + downloadURL="https://www.dm.origin.com/mac/download/Origin.dmg" + expectedTeamID="TSTV75T6Q5" + blockingProcesses=( "Origin" ) + ;;ottomatic) name="Otto Matic" type="dmg" downloadURL=$(downloadURLFromGit jorio OttoMatic) @@ -4384,6 +4617,13 @@ plisteditpro) downloadURL="https://www.fatcatsoftware.com/plisteditpro/PlistEditPro.zip" expectedTeamID="8NQ43ND65V" ;; +polylens) + name="Poly Lens" + type="dmg" + appNewVersion=$(curl -fs "https://info.lens.poly.com/lens-dt-rn/atom.xml" | grep "Version" | head -1 | cut -d "[" -f3 | sed 's/Version //g' | sed 's/]]\>\<\/title\>//g') + downloadURL="https://swupdate.lens.poly.com/lens-desktop-mac/$appNewVersion/$appNewVersion/PolyLens-$appNewVersion.dmg" + expectedTeamID="SKWK2Q7JJV" + ;; postman) name="Postman" type="zip" @@ -4485,8 +4725,13 @@ qgis-pr) r) name="R" type="pkg" - downloadURL="https://cloud.r-project.org/bin/macosx/$( curl -fsL https://cloud.r-project.org/bin/macosx/ | grep -m 1 -o '' | sed -E 's/.+"(.+)".+/\1/g' )" - appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g') + if [[ $(arch) == "arm64" ]]; then + downloadURL="https://cloud.r-project.org/bin/macosx/$( curl -fsL https://cloud.r-project.org/bin/macosx/ | grep -m 1 -o '' | sed -E 's/.+"(.+)".+/\1/g' )" + appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)-.*\..*/\1/g') + elif [[ $(arch) == "i386" ]]; then + downloadURL="https://cloud.r-project.org/bin/macosx/$( curl -fsL https://cloud.r-project.org/bin/macosx/ | grep -o '' | grep -m 1 -v "arm64" | sed -E 's/.+"(.+)".+/\1/g' )" + appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g') + fi expectedTeamID="VZLD955F6P" ;; ramboxce) @@ -4636,7 +4881,7 @@ rstudio) name="RStudio" type="dmg" downloadURL=$(curl -s -L "https://rstudio.com/products/rstudio/download/" | grep -m 1 -Eio 'href="https://download1.rstudio.org/desktop/macos/RStudio-(.*).dmg"' | cut -c7- | sed -e 's/"$//') - appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g' ) + appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.-]*)\..*/\1/g' | sed 's/-/+/' ) expectedTeamID="FYF2F5GFX4" ;; santa) @@ -4647,7 +4892,6 @@ santa) downloadURL=$(downloadURLFromGit google santa) appNewVersion=$(versionFromGit google santa) expectedTeamID="EQHXZ8M8AV" - blockingProcesses=( NONE ) ;; scaleft) name="ScaleFT" @@ -4660,7 +4904,12 @@ scaleft) screamingfrogseospider) name="Screaming Frog SEO Spider" type="dmg" - downloadURL=$(curl -fs "https://www.screamingfrog.co.uk/wp-content/themes/screamingfrog/inc/download-modal.php" | grep -i -o "https.*\.dmg" | head -1) + if [[ $(arch) == i386 ]]; then + platform="Mac - (intel)" + elif [[ $(arch) == arm64 ]]; then + platform="Mac - (apple silicon)" + fi + downloadURL=$(curl -fs "https://www.screamingfrog.co.uk/wp-content/themes/screamingfrog/inc/download-modal.php" | grep "${platform}" | grep -i -o "https.*\.dmg" | head -1) appNewVersion=$(print "$downloadURL" | sed -E 's/https.*\/[a-zA-Z]*-([0-9.]*)\.dmg/\1/g')".0" expectedTeamID="CAHEVC3HZC" ;; @@ -4877,6 +5126,14 @@ sourcetree) appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/Sourcetree_([0-9.]*)_[0-9]*\.zip/\1/g') expectedTeamID="UPXU4CQZ5P" ;; +splashtopbusiness) + name="Splashtop Business" + type="pkgInDmg" + splashtopbusinessVersions=$(curl -fsL "https://www.splashtop.com/wp-content/themes/responsive/downloadx.php?product=stb&platform=mac-client") + downloadURL=$(getJSONValue "$splashtopbusinessVersions" "url") + appNewVersion="${${downloadURL#*INSTALLER_v}%*.dmg}" + expectedTeamID="CPQQ3AW49Y" + ;; splashtopsos) name="Splashtop SOS" type="dmg" @@ -5028,6 +5285,14 @@ tageditor) appNewVersion=$(curl -sf "https://amvidia.com/tag-editor" | grep -o -E '"softwareVersion":.'"{8}" | sed -E 's/.*"([0-9.]*).*/\1/g') expectedTeamID="F2TH9XX9CJ" ;; +tailscale) + name="Tailscale" + type="zip" + appNewVersion="$(curl -s https://pkgs.tailscale.com/stable/ | awk -F- '/Tailscale.*macos.zip/ {print $2}')" + downloadURL="https://pkgs.tailscale.com/stable/Tailscale-${appNewVersion}-macos.zip" + expectedTeamID="W5364U7YZB" + versionKey="CFBundleShortVersionString" + ;; talkdeskcallbar) name="Callbar" type="dmg" @@ -5343,11 +5608,12 @@ vlc) type="dmg" if [[ $(arch) == "arm64" ]]; then downloadURL=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-arm64.xml | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2 ) - appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-arm64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) + #appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-arm64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) elif [[ $(arch) == "i386" ]]; then downloadURL=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-intel64.xml | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2 ) - appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-intel64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) + #appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-intel64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) fi + appNewVersion=$(echo ${downloadURL} | sed -E 's/.*\/vlc-([0-9.]*).*\.dmg/\1/' ) expectedTeamID="75GAHG3SZQ" ;; vmwarehorizonclient) @@ -5453,13 +5719,16 @@ wwdc) ;; xcreds) name="XCreds" - #type="pkgInZip" + # Downloading from twocanoes homepage + #type="pkgInDmg" #packageID="com.twocanoes.pkg.secureremoteaccess" #downloadURL=$(curl -fs "https://twocanoes.com/products/mac/xcreds/" | grep -ioE "https://.*\.zip" | head -1) #appNewVersion=$(curl -fs "https://twocanoes.com/products/mac/xcreds/" | grep -io "Current Version:.*" | sed -E 's/.*XCreds *([0-9.]*)<.*/\1/g') + # GitHub download type="pkg" downloadURL="$(downloadURLFromGit twocanoes xcreds)" - appNewVersion="$(versionFromGit twocanoes xcreds)" + #appNewVersion="$(versionFromGit twocanoes xcreds)" # GitHub tag contain “_” and not “.” so our function fails to get the right version + appNewVersion=$(echo "$downloadURL" | sed -E 's/.*XCreds_.*-([0-9.]*)\.pkg/\1/') expectedTeamID="UXP6YEHSPW" ;; xeroxphaser7800) @@ -5590,6 +5859,16 @@ zoomgov) expectedTeamID="BJ4HAAB9B3" versionKey="CFBundleVersion" ;; +zoomoutlookplugin) + name="Zoom Outlook Plugin" + appName="PluginLauncher.app" + targetDir="/Applications/ZoomOutlookPlugin" + type="pkg" + downloadURL="https://zoom.us/client/latest/ZoomMacOutlookPlugin.pkg" + appNewVersion="$(curl -fsIL ${downloadURL} | grep -i ^location | cut -d "/" -f5 | cut -d "." -f1-3)" + expectedTeamID="BJ4HAAB9B3" + blockingProcesses=( "PluginLauncher" ) + ;; zoomrooms) name="ZoomRooms" type="pkg" @@ -5599,6 +5878,14 @@ zoomrooms) expectedTeamID="BJ4HAAB9B3" blockingProcesses=( "ZoomPresence" ) ;; +zotero) + name="Zotero" + type="dmg" + downloadURL="https://www.zotero.org/download/client/dl?channel=release&platform=mac&version=$(curl -fs "https://www.zotero.org/download/" | grep -Eio '"mac":"(.*)' | cut -d '"' -f 4)" + expectedTeamID="8LAYR367YV" + appNewVersion=$(curl -fs "https://www.zotero.org/download/" | grep -Eio '"mac":"(.*)' | cut -d '"' -f 4) + #Company="Corporation for Digital Scholarship" + ;; zulujdk11) name="Zulu JDK 11" type="pkgInDmg" @@ -5849,6 +6136,10 @@ if [[ -n $appNewVersion ]]; then printlog "notifying" displaynotification "$message" "No update for $name!" fi + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "complete" "Latest version already installed..." + sleep 2 + fi cleanupAndExit 0 "No newer version." REQ fi else diff --git a/Labels.txt b/Labels.txt index c0de3d3..0720dea 100644 --- a/Labels.txt +++ b/Labels.txt @@ -7,11 +7,13 @@ abetterfinderrename11 abstract acroniscyberprotectconnect acroniscyberprotectconnectagent +adobeacrobatprodc adobebrackets adobeconnect adobecreativeclouddesktop adobereaderdc adobereaderdc-install +adobereaderdc-install adobereaderdc-update aircall airserver @@ -35,6 +37,8 @@ applesfmono applesfpro applesfsymbols aquaskk +archiwareb2go +archiwarepst arq7 asana atext @@ -56,7 +60,7 @@ bartender basecamp3 bbedit bettertouchtool -bitwarden +bitrix24 blender bluejeans bluejeanswithaudiodriver @@ -76,7 +80,9 @@ camtasia2020 camtasia2021 canva carboncopycloner -chatwork +charles +chronoagent +chronosync cisdem-documentreader citrixworkspace clevershare2 @@ -97,6 +103,7 @@ craftmanagerforsketch cricutdesignspace cryptomator cyberduck +cytoscape daisydisk dangerzone darktable @@ -137,6 +144,7 @@ favro fellow ferdi figma +filemakerpro filezilla findanyfile firefox @@ -154,6 +162,8 @@ flycut fontexplorer front fsmonitor +fujifilmwebcam +gfxcardstatus gimp githubdesktop golang @@ -178,6 +188,7 @@ gyazogif hancock handbrake hazel +horos houdahspot hpeasyadmin hpeasystart @@ -227,6 +238,7 @@ knockknock krisp krita lastpass +latexit launchbar lcadvancedvpnclient lexarrecoverytool @@ -299,6 +311,7 @@ nomadlogin nordlayer notion nudge +nudgesuite nvivo obs obsidian @@ -316,7 +329,7 @@ onlyofficedesktop openvpnconnect openvpnconnectv3 opera -ottomatic +origin overflow pacifist packages @@ -330,6 +343,7 @@ pitch plantronicshub platypus plisteditpro +polylens postman prism9 pritunl @@ -400,6 +414,7 @@ sonos sonoss1 sonoss2 sourcetree +splashtopbusiness splashtopsos spotify sqlpropostgres @@ -420,6 +435,7 @@ tableaudesktop tableaupublic tableaureader tageditor +tailscale talkdeskcallbar talkdeskcxcloud taskpaper @@ -489,7 +505,9 @@ zohoworkdrivetruesync zoom zoomclient zoomgov +zoomoutlookplugin zoomrooms +zotero zulujdk11 zulujdk13 zulujdk15 From b45c2f81eafb2c8ca3723fff937fc8b2f10c33b3 Mon Sep 17 00:00:00 2001 From: Theile Date: Fri, 30 Sep 2022 22:18:29 +0200 Subject: [PATCH 84/96] 10.0beta3, 2022-09-30 --- Installomator.sh | 9 +++++++++ Labels.txt | 1 + 2 files changed, 10 insertions(+) diff --git a/Installomator.sh b/Installomator.sh index a43384e..c7f7acc 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -2656,6 +2656,15 @@ egnyte) expectedTeamID="FELUD555VC" blockingProcesses=( NONE ) ;; +egnytecore) + name="Egnyte Core" + appName="Egnyte.app" + type="dmg" + downloadURL=$(curl -fs "https://egnyte-cdn.egnyte.com/desktopapp/mac/en-us/versions/default.xml" | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f 2) + appNewVersion=$(curl -fs "https://egnyte-cdn.egnyte.com/desktopapp/mac/en-us/versions/default.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f 2) + expectedTeamID="FELUD555VC" + blockingProcesses=( NONE ) + ;; egnytewebedit) name="EgnyteWebEdit" type="pkg" diff --git a/Labels.txt b/Labels.txt index 0720dea..ebcacc8 100644 --- a/Labels.txt +++ b/Labels.txt @@ -130,6 +130,7 @@ dynalist easeusdatarecoverywizard easyfind egnyte +egnytecore egnytewebedit element eraseinstall From 6b6ce8e23ef8e2d88092aefb7a627b8b55bac786 Mon Sep 17 00:00:00 2001 From: Theile Date: Fri, 30 Sep 2022 22:21:22 +0200 Subject: [PATCH 85/96] Beta-warning! --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0002ba3..da3e034 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +# This is beta-software! + +Please locate “Releases” on the right, and download the latest 9.2 release for a supported release. + # Installomator _The one installer script to rule them all._ From d01cb5fb97e029dd6a57e715ccc2f97a2c00ce6d Mon Sep 17 00:00:00 2001 From: Theile Date: Fri, 30 Sep 2022 22:37:21 +0200 Subject: [PATCH 86/96] 10.0beta3, 2022-09-30 --- Installomator.sh | 13 +++++++++++++ Labels.txt | 1 + 2 files changed, 14 insertions(+) diff --git a/Installomator.sh b/Installomator.sh index c7f7acc..d5a3a44 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -3412,6 +3412,19 @@ jamfreenroller) #appNewVersion=$(versionFromGit jamf ReEnroller) expectedTeamID="PS2F6S478M" ;; +jdk18) + name="Java SE Development Kit 18" + type="pkgInDmg" + versionKey="CFBundleShortVersionString" + if [[ $(arch) == "arm64" ]]; then + downloadURL="https://download.oracle.com/java/18/latest/jdk-18_macos-aarch64_bin.dmg" + elif [[ $(arch) == "i386" ]]; then + downloadURL="https://download.oracle.com/java/18/latest/jdk-18_macos-x64_bin.dmg" + fi + appCustomVersion(){ java --version | grep java | awk '{print $2}' } + appNewVersion=$(curl -sf "https://www.oracle.com/java/technologies/downloads/#jdk18-mac" | grep -m 1 "Java SE Development Kit" | sed "s|.*Kit \(.*\) downloads.*|\\1|") + expectedTeamID="VB5E2TV963" + ;; jetbrainsclion) name="CLion" type="dmg" diff --git a/Labels.txt b/Labels.txt index ebcacc8..6156f7e 100644 --- a/Labels.txt +++ b/Labels.txt @@ -217,6 +217,7 @@ jamfconnectconfiguration jamfmigrator jamfpppcutility jamfreenroller +jdk18 jetbrainsclion jetbrainsdatagrip jetbrainsintellijidea From bcf9ddf248195cd9ea515fda75c00982b5ba26b5 Mon Sep 17 00:00:00 2001 From: Adam Codega Date: Mon, 3 Oct 2022 12:36:21 -0400 Subject: [PATCH 87/96] Clarify beta statement regarding repos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index da3e034..f84962c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# This is beta-software! +# Note: The main repo is a beta version -Please locate “Releases” on the right, and download the latest 9.2 release for a supported release. +Please locate “Releases” on the right, and download the latest 9.2 release (either pkg or zip) for a supported release. # Installomator From 3ef2b8e3fb9998eff123628674794edaec276379 Mon Sep 17 00:00:00 2001 From: Adam Codega Date: Mon, 3 Oct 2022 13:18:19 -0400 Subject: [PATCH 88/96] Update and reformatting of README --- MDM/README.md | 68 +++++++++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 43 deletions(-) diff --git a/MDM/README.md b/MDM/README.md index 0360ffb..e9c61c0 100644 --- a/MDM/README.md +++ b/MDM/README.md @@ -1,69 +1,53 @@ -# MDM scripts +# Scripts for use with MDM -This is a long list of various scripts for certain use in the various MDM solutions that we have used Installomator with. +These example scripts are meant for use with MDM to run Installomator and process installs. Examples are also included which use swiftDialog to provide user feedback and dockutil to add app icons to the dock. -There are two categories of MDMs. Either like Jamf Pro, that can contain the full script, and call that as a software installation (called policy in Jamf Pro). If the MDM cannot do that, it have to be able to run a script on the clients. That script can call Installomator on the client, and should therefore be locally installed. +There are basically two ways to use Installomator with MDM. The "Jamf way" is where, through the MDM admin interface, your upload the Installomator script to a policy, and you provide additional parameters in the policy configuration like which app to install. The other way to use Installomator is by having the MDM install Installomator locally on the computer, just once, and then on subsequent runs the MDM runs a script which calls Installomator and provides the parameters. -## “Jamf”-folder +Examples of MDM which use the "other way" are Mosyle Manager/Mosyle Business, Addigy, and Microsoft Endpoint Manager (Intune). -Here you have scripts for using swiftDialog as part of the Installomator installation. Showing progress in a small window. Separate [ReadMe-file](Jamf/ReadMe.md) in this folder. +The scripts utilizing __swiftDialog__ require version 10 of __Installomator__. If Installomator version 9 is installed, it will set `NOTIFY=all` and use the traditional __Installomator__ notifications for showing progress, where as on version 10 it will be `NOTIFY=silent` as __swiftDialog__ is used instead. -## Script capable MDM-solutions - -So for Mosyle, Addigy, and Microsoft Endpoint Manager (Intune), we have tested these scripts. If these works in other MDMs, let us know. - -Especially for Addigy, and maybe also for other MDMs, `condition`-scripts has been added if software installation will run on certain conditions. Also `prevention`-scripts has been added, if you manually need to eliminate the runnning of a script, this can be needed if you want to use the enrollment script, but don’t want it to run on the currently managed Macs Then you should sent out the `prevention`-script to make sure the file it creates is present on the Macs so the ordinary script will not do anything (it will detect this file and stop if found). - -_The scripts utilizing __swiftDialog__ requires version 10 of __Installomator__, but will work with version 9. If runnning on version 9 it will set `NOTIFY=all` and use __Installomator__ notifications for showing progress, where as on version 10 it will be `NOTIFY=silent` as __swiftDialog__ is used instead._ - -### Shortenings +## Abbreviations used in script names - SS — Self Service — scripts designed for use through a Self Service catalog -- VFA — valuesfromarguments — a custom label call to Installomator +- VFA — valuesfromarguments — a custom label call to Installomator. When using an MDM and the "other way", you can use these scripts to provide the label variables to Installomator for custom labels. -# To be installed on all the Macs +## Condition scripts -In order for our MDM scripts to work, we need Installomator locally installed using the pkg we provide in our release. +Scripts with the `condition` suffix are for use with MDMs like Addigy, where a script is run to determine if the rest of the policy should run. -So I suggest to install these on enrollment. +## Prevention scripts -To utilize swiftDialog, we also need that installed. +The `Installomator 1st` and `Progress 1st` scripts are meant to run automatically upon device enrollment. They check for the existance of a file, `/var/db/.Installomator1stDone`, to determine whether the computer has already been deployed. You can run the prevention scripts on existing Macs to ensure the 1st scripts won't inadvertently run on them. -If you need dockutil, that should be maintained as well, but if missing the MDM scripts will install it. +## "Jamf" folder -## Maintenance of Installomator, swiftDialog, and dockutil +This folder has Jamf specific examples using swiftDialog as part of the Installomator installation. Perfect for use with Jamf Self Service. Separate [ReadMe-file](Jamf/ReadMe.md) in this folder. -I suggest to check weekly, and maybe at each boot, it newer versions have been released of these tools. +# Scripts to install prerequisites -The verious MDMs have various ways of running scheduled, but it is possible. - -### Scripts to use for installing these components - -These do not require anything to be installed on macOS: +Use these scripts to handle installing Installomator itself. Additionally, you may want to install swiftDialog manually instead of having Installomator install it. - `install Installomator direct.sh` — can be run at enrollment and as maintenance at any time to install __Installomator__. - `install swiftDialog direct.sh` — can be used at enrollment and as maintenance at any time to install __swiftDialog__. -Once Installomator has been installed, __dockutil__ can be installed using Installomator (as a service), using this script: +Once Installomator has been installed, __dockutil__ can be installed by Installomator, using this script: - `App-install/App service Auto-install.sh` — This script uses pre-installed installomator to install dockutil. # Enrollment scripts -For enrollment purposes, som 1st-scripts has been created. One is not showing anything to the end-user while running and another is using __DEPNotify__ to show progress (so hopefully the user will wait for the installation to finish): +For enrollment purposes, some 1st-scripts has been created. One runs silently, another is using __DEPNotify__ to show progress and feedback: - `Installomator 1st Auto-install DEPNotify.sh` — will install __DEPNotify__ first, start that up, and change progress on the installation bar at each installed label. Very good for Addigy. - `Installomator 1st Auto-install.sh` — runnning silently installing Installomator labels in the given order. Can be used in combination with the Progress-script. -- `Progress 1st swiftDialog.sh` — It will install __swiftDialog__ and start that up with a list of software it will look for. It will look for an installed file/folder in the file system for each item. This is great for Mosyle that can install software using various methods, and then this script can show when it has been installed. +- `Progress 1st swiftDialog.sh` — It will install __swiftDialog__ and start that up with a list of software it will look for. It will look for an installed file/folder in the file system for each item. This is great if some apps are being installed outside of Installomator, like by Apple Apps & Books, and then this script can show when it has been installed. -There are also Self Service scripts for this, if it’s somehow needed to have users running the installation manually. - -# _App-install_ folders - -Two different kinds of App-installation scripts have been made. Some that is very similar to the old provided scripts that are only using __Installomator__ for notifications (if any). And others that can use __swiftDialog__ for installation progress, and can also add the app to the Dock using __dockutil__. +There are also Self Service versions of the above. ## “App-install”-folder @@ -74,9 +58,11 @@ Two different kinds of App-installation scripts have been made. Some that is ver - App service Auto-install.sh - App VFA.sh -Here you can use scripts for Self Service (SS) or for Auto-install. THere will be a difference in how many notifications will be used and maybe handling of blocking processes. +Here you can use scripts for Self Service (SS) or for Auto-install. There will be a difference in how many notifications will be used and maybe handling of blocking processes. -What is also differentiated is what kind of app it is. Is it of the kind of browser, that can often have critical security fixes, then we don’t want the user to postpone the installation, wheras a normal app can wait. A service app do not have to ask before installing, and should be able to install regardsliess if the app is currently running. +`browser-security`: For an app like a web browser, you'll want the install performed right away, so there isn't a deferral option. +`normal`: The user can defer the update. +`service`: These are apps where we don't need to ask the user to allow the update. Menu bar apps and utilities would fall under this category. ## “App-install SS with swiftDialog and dockutil”-folder @@ -87,15 +73,11 @@ What is also differentiated is what kind of app it is. Is it of the kind of brow - App VFA SS github.sh - App VFA SS.sh -All of the notes for the above scripts are the same for these. - -But these scripts utilize __swiftDialog__ to show a more live progress for the installation, and they also have a setting to use __dockutil__ to add the software to the Dock of the user. +These scripts are similar to the App-install folder but alos utilize __swiftDialog__ to show user feedback and installation status, and they also have an option to use __dockutil__ to add the installed software to the Dock. # App-update -These script verifies if the app is already installed, before runnning Installomator. +A common requested behavior is to only update an app if it is already installed. These script verifies if the app is already installed before runnning Installomator. - App browser-security Auto-install.sh - App normal Auto-install.sh - -These scripts only use Installomator, like “App-install”, but will check for the app to be installed first. Very usefull for Addigy and Microsoft. From 76ee8610387e4130f305e3e01e5560de1ebe01c6 Mon Sep 17 00:00:00 2001 From: Theile Date: Mon, 3 Oct 2022 19:49:47 +0200 Subject: [PATCH 89/96] Smart quotes and a few italic and bold formatting --- MDM/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/MDM/README.md b/MDM/README.md index e9c61c0..15d7fca 100644 --- a/MDM/README.md +++ b/MDM/README.md @@ -1,10 +1,10 @@ # Scripts for use with MDM -These example scripts are meant for use with MDM to run Installomator and process installs. Examples are also included which use swiftDialog to provide user feedback and dockutil to add app icons to the dock. +These example scripts are meant for use with MDM to run __Installomator__ and process installs. Examples are also included which use swiftDialog to provide user feedback and dockutil to add app icons to the dock. -There are basically two ways to use Installomator with MDM. The "Jamf way" is where, through the MDM admin interface, your upload the Installomator script to a policy, and you provide additional parameters in the policy configuration like which app to install. The other way to use Installomator is by having the MDM install Installomator locally on the computer, just once, and then on subsequent runs the MDM runs a script which calls Installomator and provides the parameters. +There are basically two ways to use Installomator with MDM. The _“Jamf way”_ is where, through the MDM admin interface, your upload the Installomator script to a policy, and you provide additional parameters in the policy configuration like which app to install. The _“other way”_ to use Installomator is by having the MDM install Installomator locally on the computer, just once, and then on subsequent runs the MDM runs a script which calls Installomator and provides the parameters. -Examples of MDM which use the "other way" are Mosyle Manager/Mosyle Business, Addigy, and Microsoft Endpoint Manager (Intune). +Examples of MDMs which use the “other way” are Mosyle Manager/Mosyle Business, Addigy, and Microsoft Endpoint Manager (Intune). The scripts utilizing __swiftDialog__ require version 10 of __Installomator__. If Installomator version 9 is installed, it will set `NOTIFY=all` and use the traditional __Installomator__ notifications for showing progress, where as on version 10 it will be `NOTIFY=silent` as __swiftDialog__ is used instead. @@ -23,7 +23,7 @@ The `Installomator 1st` and `Progress 1st` scripts are meant to run automaticall ## "Jamf" folder -This folder has Jamf specific examples using swiftDialog as part of the Installomator installation. Perfect for use with Jamf Self Service. Separate [ReadMe-file](Jamf/ReadMe.md) in this folder. +This folder has Jamf specific examples using __swiftDialog__ as part of the Installomator installation. Perfect for use with Jamf Self Service. Separate [ReadMe-file](Jamf/ReadMe.md) in this folder. # Scripts to install prerequisites @@ -35,13 +35,13 @@ Use these scripts to handle installing Installomator itself. Additionally, you m Once Installomator has been installed, __dockutil__ can be installed by Installomator, using this script: -- `App-install/App service Auto-install.sh` — This script uses pre-installed installomator to install dockutil. +- `App-install/App service Auto-install.sh` — This script uses pre-installed installomator to install __dockutil__. # Enrollment scripts For enrollment purposes, some 1st-scripts has been created. One runs silently, another is using __DEPNotify__ to show progress and feedback: -- `Installomator 1st Auto-install DEPNotify.sh` — will install __DEPNotify__ first, start that up, and change progress on the installation bar at each installed label. Very good for Addigy. +- `Installomator 1st Auto-install DEPNotify.sh` — will install __DEPNotify__ first, start that up, and change progress on the installation bar at each installed label. Very good for Addigy an Microsoft. - `Installomator 1st Auto-install.sh` — runnning silently installing Installomator labels in the given order. Can be used in combination with the Progress-script. @@ -60,9 +60,9 @@ There are also Self Service versions of the above. Here you can use scripts for Self Service (SS) or for Auto-install. There will be a difference in how many notifications will be used and maybe handling of blocking processes. -`browser-security`: For an app like a web browser, you'll want the install performed right away, so there isn't a deferral option. -`normal`: The user can defer the update. -`service`: These are apps where we don't need to ask the user to allow the update. Menu bar apps and utilities would fall under this category. +`browser-security`: For an app like a web browser, you’ll want the install performed right away, so there isn’t a deferral option. +`normal`: The user can defer/skip the update. +`service`: These are apps where we don’t need to ask the user to allow the update. Menu bar apps and utilities would fall under this category. ## “App-install SS with swiftDialog and dockutil”-folder @@ -73,7 +73,7 @@ Here you can use scripts for Self Service (SS) or for Auto-install. There will b - App VFA SS github.sh - App VFA SS.sh -These scripts are similar to the App-install folder but alos utilize __swiftDialog__ to show user feedback and installation status, and they also have an option to use __dockutil__ to add the installed software to the Dock. +These scripts are similar to the App-install folder but also utilize __swiftDialog__ to show user feedback and installation status, and they also have an option to use __dockutil__ to add the installed software to the Dock. # App-update From bf89f4b42bbdc9dbf97cf921ff13e4e2a12dd51c Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Mon, 3 Oct 2022 13:56:12 -0700 Subject: [PATCH 90/96] added missing line breaks --- fragments/labels/bitrix24.sh | 2 +- fragments/labels/charles.sh | 2 +- fragments/labels/origin.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fragments/labels/bitrix24.sh b/fragments/labels/bitrix24.sh index 033cb81..c5b6a6d 100644 --- a/fragments/labels/bitrix24.sh +++ b/fragments/labels/bitrix24.sh @@ -5,4 +5,4 @@ bitrix24) downloadURL="https://dl.bitrix24.com/b24/bitrix24_desktop.dmg" expectedTeamID="5B3T3A994N" blockingProcesses=( "Bitrix24" ) - ;; \ No newline at end of file + ;; diff --git a/fragments/labels/charles.sh b/fragments/labels/charles.sh index 0c70782..9f4c086 100644 --- a/fragments/labels/charles.sh +++ b/fragments/labels/charles.sh @@ -4,4 +4,4 @@ charles) appNewVersion=$(curl -fs https://www.charlesproxy.com/download/latest-release/ | sed -nE 's/.*version.*value="([^"]*).*/\1/p') downloadURL="https://www.charlesproxy.com/assets/release/$appNewVersion/charles-proxy-$appNewVersion.dmg" expectedTeamID="9A5PCU4FSD" - ;; \ No newline at end of file + ;; diff --git a/fragments/labels/origin.sh b/fragments/labels/origin.sh index 2fbdb90..2262b79 100644 --- a/fragments/labels/origin.sh +++ b/fragments/labels/origin.sh @@ -4,4 +4,4 @@ origin) downloadURL="https://www.dm.origin.com/mac/download/Origin.dmg" expectedTeamID="TSTV75T6Q5" blockingProcesses=( "Origin" ) - ;; \ No newline at end of file + ;; From 01d1238b0dec2061b01ad9a6efde5e9e6623679f Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Mon, 3 Oct 2022 13:57:56 -0700 Subject: [PATCH 91/96] fixed parallelsrasclient file name --- fragments/labels/{parallelsrasclient sh => parallelsrasclient.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename fragments/labels/{parallelsrasclient sh => parallelsrasclient.sh} (100%) diff --git a/fragments/labels/parallelsrasclient sh b/fragments/labels/parallelsrasclient.sh similarity index 100% rename from fragments/labels/parallelsrasclient sh rename to fragments/labels/parallelsrasclient.sh From c36c14c2d6914e32a015f3531a8403f88ab95ce7 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Mon, 3 Oct 2022 14:43:35 -0700 Subject: [PATCH 92/96] removed extraneous file --- fragments/labels/fellow | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 fragments/labels/fellow diff --git a/fragments/labels/fellow b/fragments/labels/fellow deleted file mode 100644 index 9fddce1..0000000 --- a/fragments/labels/fellow +++ /dev/null @@ -1,7 +0,0 @@ -fellow) - name="Fellow" - type="dmg" - downloadURL="https://fellow.app/desktop/download/darwin/latest/" - appNewVersion="$(curl -fsIL "${downloadURL}" | grep -i ^location | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/' | head -1)" - expectedTeamID="2NF46HY8D8" - ;; From 116937a948fcc8515044b82467d043101929dc72 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Mon, 3 Oct 2022 14:50:26 -0700 Subject: [PATCH 93/96] Update CHANGELOG.md --- CHANGELOG.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bc345c..ec0d533 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,61 @@ +## v10beta3 + +- option to add item to dock if dockutil is installed (#701 requires dockutil https://github.com/kcrawford/dockutil ) +- further improvements to GitHub downloads (#691) +- updated user dialog when app is already on the latest version (#658) + +Plus everything from beta1 and beta2. + +- new labels: + - adobeacrobatprodc + - adobereaderdc-install + - archiwareb2go + - archiwarepst + - bitrix24 + - charles + - chronoagent + - chronosync + - cytoscape + - egnytecore (#655) + - fellow + - filemakerpro (#609) + - fujifilmwebcam + - gfxcardstatus + - horos (#610) + - jdk18 (#608) + - latexit + - nudgesuite + - origin + - parallelsrasclient + - polylens + - splashtopbusiness + - tailscale + - zoomoutlookplugin + - zotero + +- updated labels: + - acroniscyberprotectconnectagent + - adobecreativeclouddesktop + - adobereaderdc-update + - audacity + - duckduckgo + - libreoffice (#605) + - nudge + - obs + - r + - rstudio + - screamingfrogseospider + - vlc + - xcreds + + + ## v10beta2 - fixed problem with GitHub labels (#659) - bz2 archive support (#659) - fixed WorkspaceOne support (#653) +- updated how `aapNewVersion` is determined (#680) Plus everything from v10beta1 From 47acb6443d2672301a63464d886bea110c6e422a Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Mon, 3 Oct 2022 16:05:25 -0700 Subject: [PATCH 94/96] Update CHANGELOG.md --- CHANGELOG.md | 55 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec0d533..e366a30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,45 +7,46 @@ Plus everything from beta1 and beta2. - new labels: - - adobeacrobatprodc - - adobereaderdc-install - - archiwareb2go - - archiwarepst - - bitrix24 - - charles - - chronoagent - - chronosync - - cytoscape + - adobeacrobatprodc (#707) + - adobereaderdc-install (#707) + - archiwareb2go (#625, #707) + - archiwarepst (#624) + - bitrix24 (#661) + - charles (#670) + - chronoagent (#617) + - chronosync (#616) + - cytoscape (#689) - egnytecore (#655) - fellow - filemakerpro (#609) - fujifilmwebcam - - gfxcardstatus + - gfxcardstatus (#690) - horos (#610) - jdk18 (#608) - - latexit - - nudgesuite - - origin - - parallelsrasclient - - polylens - - splashtopbusiness - - tailscale - - zoomoutlookplugin - - zotero + - latexit (#684) + - nudgesuite (#633) + - origin (#662) + - parallelsrasclient (#607) + - polylens (#671) + - splashtopbusiness (#660) + - tailscale (#620) + - zoomoutlookplugin (#656) + - zotero (#634) + - zulujdk18 (#612) - updated labels: - - acroniscyberprotectconnectagent - - adobecreativeclouddesktop - - adobereaderdc-update - - audacity - - duckduckgo + - acroniscyberprotectconnectagent (#678) + - adobecreativeclouddesktop (#687) + - adobereaderdc-update (#707) + - audacity (#708) + - duckduckgo (#704) - libreoffice (#605) - nudge - - obs - - r + - obs (#692) + - r (#702) - rstudio - screamingfrogseospider - - vlc + - vlc (#705, #606) - xcreds From a4f8b65932182e180ea87d785fe2835d867108f7 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Mon, 3 Oct 2022 16:08:39 -0700 Subject: [PATCH 95/96] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e366a30..28868c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,11 +17,12 @@ Plus everything from beta1 and beta2. - chronosync (#616) - cytoscape (#689) - egnytecore (#655) - - fellow + - fellow (#599) - filemakerpro (#609) - - fujifilmwebcam + - fujifilmwebcam (#598) - gfxcardstatus (#690) - horos (#610) + - inetclearreportsdesigner (#601) - jdk18 (#608) - latexit (#684) - nudgesuite (#633) @@ -44,8 +45,8 @@ Plus everything from beta1 and beta2. - nudge - obs (#692) - r (#702) - - rstudio - - screamingfrogseospider + - rstudio (#702) + - screamingfrogseospider (#665) - vlc (#705, #606) - xcreds From 3364e6cf0753bf114f5f9ce1cf99ffaef72396fe Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Mon, 3 Oct 2022 16:09:30 -0700 Subject: [PATCH 96/96] updated Labels and main script --- Installomator.sh | 40 ++++++++++++++++++++++++++++++++++++---- Labels.txt | 6 ++++++ 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/Installomator.sh b/Installomator.sh index d5a3a44..7d99648 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -323,7 +323,7 @@ if [[ $(/usr/bin/arch) == "arm64" ]]; then fi fi VERSION="10.0beta3" -VERSIONDATE="2022-09-30" +VERSIONDATE="2022-10-03" # MARK: Functions @@ -2072,7 +2072,8 @@ bitrix24) downloadURL="https://dl.bitrix24.com/b24/bitrix24_desktop.dmg" expectedTeamID="5B3T3A994N" blockingProcesses=( "Bitrix24" ) - ;;bitwarden) + ;; +bitwarden) name="Bitwarden" type="dmg" downloadURL=$(downloadURLFromGit bitwarden desktop ) @@ -2247,7 +2248,8 @@ charles) appNewVersion=$(curl -fs https://www.charlesproxy.com/download/latest-release/ | sed -nE 's/.*version.*value="([^"]*).*/\1/p') downloadURL="https://www.charlesproxy.com/assets/release/$appNewVersion/charles-proxy-$appNewVersion.dmg" expectedTeamID="9A5PCU4FSD" - ;;chatwork) + ;; +chatwork) name="Chatwork" type="dmg" downloadURL="https://desktop-app.chatwork.com/installer/Chatwork.dmg" @@ -3307,6 +3309,15 @@ imazingprofileeditor) downloadURL="https://downloads.imazing.com/mac/iMazing-Profile-Editor/iMazingProfileEditorMac.dmg" expectedTeamID="J5PR93692Y" ;; +inetclearreportsdesigner) + name="i-Net Clear Reports Designer" + type="appindmg" + appNewVersion=$(curl -s https://www.inetsoftware.de/products/clear-reports/designer | grep "Latest release:" | cut -d ">" -f 4 | cut -d \ -f 2) + downloadURL=$(curl -s https://www.inetsoftware.de/products/clear-reports/designer | grep $appNewVersion | grep dmg | cut -d ">" -f 12 | cut -d \" -f 2) + expectedTeamID="9S2Y97K3D9" + blockingProcesses=( "clear-reports-designer" ) + #forcefulQuit=YES + ;; inkscape) # credit: Søren Theilgaard (@theilgaard) name="Inkscape" @@ -4538,7 +4549,8 @@ origin) downloadURL="https://www.dm.origin.com/mac/download/Origin.dmg" expectedTeamID="TSTV75T6Q5" blockingProcesses=( "Origin" ) - ;;ottomatic) + ;; +ottomatic) name="Otto Matic" type="dmg" downloadURL=$(downloadURLFromGit jorio OttoMatic) @@ -4577,6 +4589,13 @@ pandoc) archiveName="mac.pkg" expectedTeamID="5U2WKE6DES" ;; +parallelsrasclient) + name="Parallels Client" + type="pkg" + appNewVersion=$(curl -sf "https://download.parallels.com/ras/v18/RAS%20Client%20for%20Mac%20Changelog.txt" | grep -m 1 "Parallels Client for Mac Version" | sed "s|.*Version \(.*\) -.*|\\1|" | sed 's/ /./g' | sed 's/[^0-9.]//g') + downloadURL=$(appMajorVersion=`sed 's/\..*//' <<< $appNewVersion` && appHyphenVersion=`curl -sf "https://download.parallels.com/ras/v18/RAS%20Client%20for%20Mac%20Changelog.txt" | grep -m 1 "Parallels Client for Mac Version" | sed "s|.*Version \(.*\) -.*|\\1|" | sed 's/ /-/g' | sed 's/[^0-9.-]//g'` && echo https://download.parallels.com/ras/v"$appMajorVersion"/"$appNewVersion"/RasClient-Mac-Notarized-"$appHyphenVersion".pkg) + expectedTeamID="4C6364ACXT" + ;; paretosecurity) name="Pareto Security" type="dmg" @@ -5960,6 +5979,19 @@ zulujdk17) appCustomVersion(){ java -version 2>&1 | grep Runtime | awk '{print $4}' | sed -e "s/.*Zulu//" | cut -d '-' -f 1 | sed -e "s/+/\./" } appNewVersion=$(echo "$downloadURL" | cut -d "-" -f 1 | sed -e "s/.*zulu//") # Cannot be compared to anything ;; +zulujdk18) + name="Zulu JDK 18" + type="pkgInDmg" + packageID="com.azulsystems.zulu.18" + if [[ $(arch) == i386 ]]; then + downloadURL=https://cdn.azul.com/zulu/bin/$(curl -fs "https://cdn.azul.com/zulu/bin/" | grep -Eio '">zulu18.*ca-jdk18.*x64.dmg(.*)' | cut -c3- | sed 's/<\/a>//' | sed -E 's/([0-9.]*)M//' | awk '{print $2 $1}' | sort | cut -c11- | tail -1) + elif [[ $(arch) == arm64 ]]; then + downloadURL=https://cdn.azul.com/zulu/bin/$(curl -fs "https://cdn.azul.com/zulu/bin/" | grep -Eio '">zulu18.*ca-jdk18.*aarch64.dmg(.*)' | cut -c3- | sed 's/<\/a>//' | sed -E 's/([0-9.]*)M//' | awk '{print $2 $1}' | sort | cut -c11- | tail -1) + fi + expectedTeamID="TDTHCUPYFR" + appCustomVersion(){ java -version 2>&1 | grep Runtime | awk '{print $4}' | sed -e "s/.*Zulu//" | cut -d '-' -f 1 | sed -e "s/+/\./" } + appNewVersion=$(echo "$downloadURL" | cut -d "-" -f 1 | sed -e "s/.*zulu//") # Cannot be compared to anything + ;; zulujdk8) name="Zulu JDK 8" type="pkgInDmg" diff --git a/Labels.txt b/Labels.txt index 6156f7e..c8bad36 100644 --- a/Labels.txt +++ b/Labels.txt @@ -61,6 +61,7 @@ basecamp3 bbedit bettertouchtool bitrix24 +bitwarden blender bluejeans bluejeanswithaudiodriver @@ -81,6 +82,7 @@ camtasia2021 canva carboncopycloner charles +chatwork chronoagent chronosync cisdem-documentreader @@ -202,6 +204,7 @@ idrivethin iina imageoptim imazingprofileeditor +inetclearreportsdesigner inkscape insomnia installomator @@ -332,10 +335,12 @@ openvpnconnect openvpnconnectv3 opera origin +ottomatic overflow pacifist packages pandoc +parallelsrasclient paretosecurity parsec pdfsam @@ -514,4 +519,5 @@ zulujdk11 zulujdk13 zulujdk15 zulujdk17 +zulujdk18 zulujdk8