#!/bin/sh

#
# this postinstall should run installhelper in the background, with it then waiting until
# managedsoftwareupdate isn't running and then (re)load Munki's appusage launchditems items as needed
#

# Only execute postinstall actions if we're installing on a live system.
if [ "$3" = "/" ]
then
    installHelper='/usr/local/munki/libexec/installhelper'
    if [ -f  "${installHelper}" ] ; then
        /bin/echo "Loading ${installHelper}..."
        "${installHelper}" appusage &
    else
        /bin/echo "Cannot locate: ${installHelper}..."
    fi
fi