Files
jenkins/osx/scripts/postinstall-launchd
T
Sami Tikka 3a52395ce4 Mac: Load and run Jenkins unconditionally to prevent user confusion.
Sometimes users unload Jenkins using the launchctl -w option.
This permanently disables the Jenkins launchd job.
When the user re-installs Jenkins, he gets confused when
Jenkins doesn't load and run automatically and there is no
good error message from launchctl when it ignores the
Jenkins job because it is permanently disabled.
("nothing found to load")

Always forcing Jenkins to run after installation seems to be
the way of minimum confusion. The user is installing Jenkins
because he wants to run Jenkins, right?
2011-11-09 01:02:29 +02:00

13 lines
431 B
Bash
Executable File

#!/bin/bash
JENKINS_PLIST="/Library/LaunchDaemons/org.jenkins-ci.plist"
# Because PackageMaker just copies the components, we need to fix the permissions
chown root:wheel ${JENKINS_PLIST}
chmod 644 ${JENKINS_PLIST}
mkdir -p /Users/Shared/Jenkins
find /Users/Shared/Jenkins -not -user daemon -or -not -group daemon -print0 | xargs -0 chown daemon:daemon
# Load and start the launch daemon
/bin/launchctl load -w ${JENKINS_PLIST}