Created
November 30, 2022 05:12
-
-
Save AndrewWCarson/9758763ad94b3e366138b86487e00475 to your computer and use it in GitHub Desktop.
An example Custom Fact for Addigy to report the packages file size in human readable format.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
packagesDir="/Library/Addigy/ansible/packages" | |
if [ ! -d "${packagesDir}" ]; then | |
echo "0B" | |
else | |
/usr/bin/du -h -d 0 /Library/Addigy/ansible/packages | awk '{print $1}' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment