diff --git a/Scripts/postinstall b/Scripts/postinstall index 2aee71a..8ef5fba 100755 --- a/Scripts/postinstall +++ b/Scripts/postinstall @@ -4,6 +4,8 @@ set -e identifier="com.ninxsoft.mist.helper" -launchctl bootstrap system "/Library/LaunchDaemons/$identifier.plist" +if ! launchctl print "system/$identifier" &> /dev/null ; then + launchctl bootstrap system "/Library/LaunchDaemons/$identifier.plist" +fi exit 0 diff --git a/Scripts/preinstall b/Scripts/preinstall index 859659f..9e23b68 100755 --- a/Scripts/preinstall +++ b/Scripts/preinstall @@ -2,9 +2,9 @@ set -e -identifier="system/com.ninxsoft.mist.helper" +identifier="com.ninxsoft.mist.helper" -if launchtl print "system/$identifier" ; then +if launchctl print "system/$identifier" &> /dev/null ; then launchctl bootout "system/$identifier" fi