Skip to content

How can i add my own label to the script

Maurits edited this page Nov 13, 2024 · 2 revisions

Just like Installomator you can add your own labels for software you want to uninstall. Add your software title as separate file to the labels folder and run the assemble.sh script to generate a new uninstaller script to the build folder. Please use the same label as the labels in Installomator (if your app is included) Many thanks to the installomator-team for the separate labels mechanism and assemble script.

You can use these variables in your own label script:

Variables

Key Description Remarks Example
appTitle Software Title appTitle="Jamf Connect"
appProcesses Process to kill during uninstall appTitle is used if appProcesses is left empty appProcesses+=("Jamf Connect")
appFiles files/folders to be removed. First entry MUST contain the full path to the application. Addition lines can contain path to plist file, app support folders or other data that must be installed appFiles+=("/Users/$loggedInUser/Library/Application Support/JamfConnect")
appLaunchAgents path to launchagent plist. plist will be unloaded and removed appFiles+=("/Users/$loggedInUser/Library/Application Support/JamfConnect")
appLaunchDaemons path to launchdaemon plist. plist will be unloaded and removed appFiles+=("/Users/$loggedInUser/Library/Application Support/JamfConnect")
appReceipts receipt to forget BundleIdentifier from Info.plist is used if left empty appReceipts+=("com.teamviewer.AuthorizationPlugin")
preflightCommand command to run BEFORE uninstalling preflightCommand+=("/usr/local/bin/authchanger -reset")
postflightCommand command to run AFTER uninstalling postflightCommand+=("touch /tmp/.uninstall-done")

There are 2 substitutions you can use in the label: $loggedInUser This will be replaced by the username of only the current logged in user:

For example: appFiles+=("/Users/$loggedInUser/Library/Application Support/JamfConnect")

<<Users>> This will be replaced by the path of EVERY user homefolder:

For example: appFiles+=("<<Users>>/Library/Application Support/JamfConnect")

Because sometimes you want the remove files for every user on the Mac

Example label

jamfconnect)
      appTitle="Jamf Connect"
      appProcesses+=("Jamf Connect")
      appFiles+=("/Applications/Jamf Connect.app")
      appFiles+=("/Library/Application Support/JamfConnect")
      appFiles+=("/usr/local/bin/authchanger")
      appFiles+=("/usr/local/lib/pam/pam_saml.so.2")
      appFiles+=("/Library/Security/SecurityAgentPlugins/JamfConnectLogin.bundle")
      appFiles+=("/Library/Application Support/JamfConnect")
      appLaunchAgents+=("/Library/LaunchAgents/com.jamf.connect.plist")
      appLaunchAgents+=("/Library/LaunchAgents/com.jamf.connect.unlock.login.plist")
      appLaunchDaemons+=("/Library/LaunchDaemons/com.jamf.connect.daemon.plist")
      preflightCommand+=("/usr/local/bin/authchanger -reset")
      ;;

Pull Request

If you want to collaborate, please file a Pull Request (PR) for a label. If you need some help to create PR's: follow the guidance of the Installomator project https://github.com/Installomator/Installomator/wiki/GitHub-howto-create-PRs

Clone this wiki locally