Addigy Profiles provide the means for pushing out lots of vital settings to your devices. By default, Profiles will reinstall themselves every 30 minutes to keep these settings enforced. But, just like Custom Software, you can add a Condition script that will determine when the Profile should be installed.


To read about Custom Software Condition scripts, check out our article Creating Custom Software.


Conditions for Profiles work the same as they do for Custom Software. The Condition script runs before the Profile gets installed. The exit status of the Condition script determines whether the installation will be performed or skipped. This makes Condition scripts for Profiles a very flexible tool for regulating which devices install which Profiles.

 

Adding a Condition


Step 1: Navigate to the Policies page from the left column menu.

Step 2: Click on the Catalog on the Policies page.

Step 3: Click on the Profiles from the Catalog menu, this will show you the list of Profiles you may edit conditions on (alternatively you may also select Custom Profiles).



By default, Install on Success will be turned on and the Condition script will simply be "true". This will mean that the Profile will install every time it is run. When a Profile with this default Condition is added to a Policy, it will reinstall every 30 minutes when the Policy is run by the device.


Checking if the Profile Is Already Installed

The most common Condition script checks to see if the Profile already exists on the device. This will prevent the Profile from being reinstalled every 30 minutes. Here is a sample Condition script that will check for whatever name is placed in the profileName variable:


profileName="My Example Profile"

if profiles -P | grep "com.addigy.policy.${profileName}"; then
     echo "Profile found. Skipping install."
    exit 1
else
    echo "Profile not installed. Installing."
    exit 0
fi


Note: the Install on Success option should be toggled on for this to function correctly.


In this example, the profileName variable should match exactly what the Profile is titled within Addigy web app.


If you have an Addigy account and have additional questions, you can create a ticket by emailing support@addigy.com.

Alternatively, you can submit a support request within Addigy.