The Addigy policier is the utility that downloads, installs, and tracks the progress of everything applied to a policy. It usually runs on its own without any intervention, but when a device's policy status looks stuck or unclear, these terminal commands let you check on and troubleshoot the policier directly.
Overview
Policy deployment status is normally visible right in the Addigy UI — see Policy Deployment Status Overview. The commands below are for the cases where you need more detail than the UI shows, or need to kick the policier into action manually.
- Start a policy deployment on demand
- Check whether a file is actively downloading
- Reset a device's stuck or stale policy status
- Confirm whether the policier process is currently running
Prerequisites
- All commands can be run remotely via LiveTerminal, GoLive, or the Devices page
- For general scripting, see Using the GoLive Terminal and Creating and Running Scripts
How to Start the Policy via Terminal Command
Use this command to manually kick off a policy deployment on a device.
if sudo launchctl start com.addigy.policier; then echo "Policy started." && exit 0; else echo "Error starting policy." && exit 1; fi
This starts the policier process, which downloads and executes every item associated with the policy. It outputs Policy started. once the policier begins running, or Error starting policy. if it fails to start.
Note: This command has no effect on a policy that's already actively deploying.
How to Check for In-Progress Downloads
Use this command to confirm whether a file deployed via a Policy is currently being downloaded to a device.
if sudo ps aux | grep -v grep | grep lan-cache; then echo "Download in progress." && exit 0; else echo "No download is being performed." && exit 1; fi
The output is Download in progress. if a file is currently downloading, or No download is being performed. if it isn't.
How to Reset Policy Progress on a Device
If a device stops reporting the status of items deployed via its policy, you can reset that progress. Policy item status is stored in a JSON file at /Library/Addigy/ansible/status.json; deleting it clears the device's deployment progress so it can be reported fresh.
if sudo rm /Library/Addigy/ansible/status.json; then echo "Reset policy progress." && exit 0; else echo "Failed to reset policy progress by deleting status.json file." && exit 1; fi
The output is Reset policy progress. if the file is deleted successfully, or Failed to reset policy progress by deleting status.json file. if it isn't.
How to Check Whether the Policy Is Running
Use this command to confirm whether the policier process is currently running on a device.
if ! sudo ps aux | grep -v grep | grep policier; then echo "Policier not running." && exit 1; fi
This returns the running policier process if one is found, or Policier not running. if it isn't. It can be run locally on a device or remotely via LiveTerminal, GoLive, or the Devices page.