Posted on 11-23-2015 07:22 AM
I wanted to share my Extension Attribute that queries the serial from OmniGraffle Version 6 (Purchased directly, not through AppStore). I couldn't find one here, so might someone is interested:
#!/bin/bash
user=$(ls -l /dev/console | cut -d " " -f 4)
location=$(sudo -u $user echo $HOME)
if [ -d "$location/Library/Containers/com.omnigroup.OmniGraffle6" ]; then
sudo -u $user cp ~/Library/Containers/com.omnigroup.OmniGraffle6/Data/Library/Application Support/Omni Group/Software Licenses/OmniGraffle*.omnilicense /private/tmp/
result=`cat /private/tmp/OmniGraffle*.omnilicense | grep -A 1 Key | grep string | sed 's/<string>//g' | sed 's/</string>//g' | awk '{print $1}'`
rm -rf /private/tmp/OmniGraffle*.omnilicense
fi
echo "<result>$result</result>"
Posted on 01-06-2017 08:08 PM
Was having issues getting this to work with OmniGraffle 6.6.2 but found that the license file now lives in a different location:
~/Library/Containers/com.omnigroup.OmniGraffle6/Data/Library/Application Support/The Omni Group/OmniGraffle
Thanks!