Skip to content

Instantly share code, notes, and snippets.

@CLCL
Created March 2, 2016 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CLCL/115dbea5996dfdabbe03 to your computer and use it in GitHub Desktop.
Save CLCL/115dbea5996dfdabbe03 to your computer and use it in GitHub Desktop.
JenkinsCIをyum updateすると、これのせいでworkdir以下のchownが時間掛かり過ぎる JENKINS_INSTALL_SKIP_CHOWNの変数で制御できるのかな今度試す
/sbin/chkconfig --add jenkins
# If we have an old hudson install, rename it to jenkins
if test -d /var/lib/hudson; then
# leave a marker to indicate this came from Hudson.
# could be useful down the road
# This also ensures that the .??* wildcard matches something
touch /var/lib/hudson/.moving-hudson
mv -f /var/lib/hudson/* /var/lib/hudson/.??* /var/lib/jenkins
rmdir /var/lib/hudson
find /var/lib/jenkins -user hudson -exec chown jenkins {} + || true
fi
if test -d /var/run/hudson; then
mv -f /var/run/hudson/* /var/run/jenkins
rmdir /var/run/hudson
fi
# Ensure the right ownership on files
. /etc/sysconfig/jenkins
if test x"$JENKINS_INSTALL_SKIP_CHOWN" != "xtrue"; then
chown -R ${JENKINS_USER:-jenkins} /var/cache/jenkins
chown -R ${JENKINS_USER:-jenkins} /var/log/jenkins
chown -R ${JENKINS_USER:-jenkins} ${JENKINS_HOME:-/var/lib/jenkins}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment