Compatibility with macOS 11 and adding more recent PCRE
[OSXPackageBuilder.git] / pkg content skeleton / Applications / Privoxy / uninstall.command
index 76054ac..6f32080 100755 (executable)
@@ -72,9 +72,9 @@ if [ "$UID" -eq "$root_UID" ]; then
                        echo 'Delete package installation receipt (ignore errors relating to other bundle identifiers).'
                        # On OS X 10.5 or newer we can use the new pkgutil command else simply delete the receipt file
                        if [ -x /usr/sbin/pkgutil ]; then
-                               pkgutil --forget org.ijbswa.privoxyPRIVOXY_VERSION.pkg
+                               pkgutil --forget org.ijbswa.privoxy.pkg
                        else
-                               rm -rf /Library/Receipts/Privoxy\ PRIVOXY_VERSION\ OS\ X\ 10.4.pkg
+                               rm -rf /Library/Receipts/Privoxy\ OS\ X\ 10.4.pkg
                        fi
 
                        # Check the Trash, just in case the user manually removed the only obvious item from /Applications
@@ -88,7 +88,7 @@ if [ "$UID" -eq "$root_UID" ]; then
 
                        case "${darwin_major_rel_num}" in
                                # Mac OS X 10.5 or higher
-                               9|1*)
+                               9|1*|2*|3*)
                                        # Delete Privoxy LaunchDaemon
                                        echo 'Delete Privoxy LaunchDaemon (an error will be thrown regarding "no such process")'
                                        /bin/launchctl unload /Library/LaunchDaemons/org.ijbswa.privoxy.plist
@@ -140,4 +140,4 @@ else
        echo
 fi
 
-exit 0
\ No newline at end of file
+exit 0