Files
jenkins/osx/scripts/preinstall-launchd
T
Sami Tikka 5dd78439c8 Mac: Reload launch daemon on upgrades
Although there aren't any Jenkins packages deployed that use a launch daemon, soon there will be.
Let's make the preinstall capable of handling that already now.
2011-07-05 17:39:28 -07:00

11 lines
361 B
Bash

#!/bin/bash
# Remove the old launchd plist if needed
JENKINS_PLIST="/Library/LaunchAgents/org.jenkins-ci.plist"
if [ -f ${JENKINS_PLIST} ]; then
rm ${JENKINS_PLIST}
fi
JENKINS_DAEMON_PLIST="/Library/LaunchDaemons/org.jenkins-ci.plist"
launchctl unload ${JENKINS_DAEMON_PLIST} || echo 'Failed to unload old Jenkins launch daemon. Maybe it is was not loaded?'