Skip to main content

Worklet: Install Discord client on Mac


Nic-Automox

This worklet will check to see if Discord is installed and if it isn’t, will download and install it.

 

See this KB article for how to setup a worklet:

 

 

https://help.automox.com/hc/en-us/articles/5603324231700-Creating-a-Worklet

 

Evaluation Code:

 

 

#!/bin/bash



if [ -d "/Applications/Discord.app" ]; then

    exit 0

else

    exit 1

fi

 

Remediation Code:

 

 

#!/bin/bash



echo -e "Downloading Discord..."

curl -L -o "/tmp/Discord.dmg" https://discordapp.com/api/download?platform=osx



echo -e "Installing Discord..."

hdiutil attach "/tmp/Discord.dmg" -nobrowse

ditto "/Volumes/Discord/Discord.app" "/Applications/Discord.app"



echo -e "Cleaning up..."

hdiutil detach "/Volumes/Discord"

rm -f "/tmp/Discord.dmg"

This topic has been closed for comments

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings