Skip to content

Commit

Permalink
notify of install failure
Browse files Browse the repository at this point in the history
  • Loading branch information
BIG-RAT committed Apr 20, 2023
1 parent 4f462d6 commit d90374c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
Binary file not shown.
6 changes: 6 additions & 0 deletions ReEnroller/1/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ if [ -e /private/var/root/Library/Preferences/com.jamf.pse.ReEnroller.plist ];th
rm /private/var/root/Library/Preferences/com.jamf.pse.ReEnroller.plist
fi

if [ ! -d "/Library/Application Support/JAMF/ReEnroller/ReEnroller.app" ]; then
logger -t ReEnroller -f /var/log/jamf.log "ReEnroller app failed to install"
echo "ReEnroller app failed to install"
exit 1
fi

if [[ ${osvers_major} -ge 11 ]]; then
launchctl bootstrap system /Library/LaunchDaemons/com.jamf.ReEnroller.plist
else
Expand Down
4 changes: 3 additions & 1 deletion ReEnroller/1/preinstall
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if [ "$loaded" != "" ];then
sleep 1
fi

if [ -d "/Library/Application Support/JAMF/ReEnroller" ];
if [ -d "/Library/Application Support/JAMF/ReEnroller" ]; then
pkgutil --forget com.jamf.ReEnroller
rm -fr "/Library/Application Support/JAMF/ReEnroller"
sleep 1
fi
6 changes: 6 additions & 0 deletions ReEnroller/2/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ chmod -R 750 "/Library/Application Support/JAMF/ReEnroller"
if [ -e /private/var/root/Library/Preferences/com.jamf.pse.ReEnroller.plist ];then
rm /private/var/root/Library/Preferences/com.jamf.pse.ReEnroller.plist
fi

if [ ! -d "/Library/Application Support/JAMF/ReEnroller/ReEnroller.app" ]; then
logger -t ReEnroller -f /var/log/jamf.log "ReEnroller app failed to install"
echo "ReEnroller app failed to install"
exit 1
fi
6 changes: 4 additions & 2 deletions ReEnroller/2/preinstall
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if [ "$loaded" != "" ];then
sleep 1
fi

if [ -d "/Library/Application Support/JAMF/ReEnroller" ];
rm -fr "/Library/Application Support/JAMF/ReEnroller"
if [ -d "/Library/Application Support/JAMF/ReEnroller" ]; then
pkgutil --forget com.jamf.ReEnroller
rm -fr "/Library/Application Support/JAMF/ReEnroller"
sleep 1
fi

0 comments on commit d90374c

Please sign in to comment.