diff options
-rwxr-xr-x | update_jdn.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/update_jdn.sh b/update_jdn.sh index 4afe8f52..29de8569 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -246,7 +246,7 @@ if [ "$HOSTNAME" = "jenkins" ] ; then fi cd /etc/munin/plugins ; sudo rm -f postfix_* open_inodes df_inode interrupts irqstats threads proc_pri vmstat if_err_eth0 fw_forwarded_local fw_packets forks open_files users 2>/dev/null -[ -L apache_accesses ] || for i in apache_accesses apache_volume ; do ln -s /usr/share/munin/plugins/$i $i ; done +[ -L apache_accesses ] || for i in apache_accesses apache_volume ; do sudo ln -s /usr/share/munin/plugins/$i $i ; done explain "Packages configured." sudo service munin-node force-reload @@ -256,25 +256,25 @@ sudo service munin-node force-reload cd $BASEDIR for dir in bin logparse job-cfg features live ; do cp --preserve=mode,timestamps -r $dir /srv/jenkins/ - chown -R jenkins-adm.jenkins-adm /srv/jenkins/$dir + sudo chown -R jenkins-adm.jenkins-adm /srv/jenkins/$dir done -mkdir -p /var/lib/jenkins/.ssh -cp jenkins-home/procmailrc /var/lib/jenkins/.procmailrc -cp jenkins-home/authorized_keys /var/lib/jenkins/.ssh/authorized_keys -chown -R jenkins:jenkins /var/lib/jenkins/.ssh -chmod 700 /var/lib/jenkins/.ssh -chmod 600 /var/lib/jenkins/.ssh/authorized_keys +sudo mkdir -p /var/lib/jenkins/.ssh +sudo cp jenkins-home/procmailrc /var/lib/jenkins/.procmailrc +sudo cp jenkins-home/authorized_keys /var/lib/jenkins/.ssh/authorized_keys +sudo chown -R jenkins:jenkins /var/lib/jenkins/.ssh +sudo chmod 700 /var/lib/jenkins/.ssh +sudo chmod 600 /var/lib/jenkins/.ssh/authorized_keys explain "Jenkins updated." if [ "$HOSTNAME" = "jenkins" ] ; then - cp -pr README INSTALL TODO CONTRIBUTING d-i-preseed-cfgs /var/lib/jenkins/userContent/ + sudo cp -pr README INSTALL TODO CONTRIBUTING d-i-preseed-cfgs /var/lib/jenkins/userContent/ git log | grep ^Author| cut -d " " -f2-|sort -u > $TMPFILE echo "----" >> $TMPFILE - cat THANKS.head > /var/lib/jenkins/userContent/THANKS + sudo cat THANKS.head > /var/lib/jenkins/userContent/THANKS # samuel and lunar committed with several commiters, only display one - grep -v "samuel.thibault@ens-lyon.org" $TMPFILE | grep -v Lunar >> /var/lib/jenkins/userContent/THANKS + grep -v "samuel.thibault@ens-lyon.org" $TMPFILE | sudo grep -v Lunar >> /var/lib/jenkins/userContent/THANKS rm $TMPFILE - cp -pr userContent /var/lib/jenkins/ + sudo cp -pr userContent /var/lib/jenkins/ cd /var/lib/jenkins/userContent/ ASCIIDOC_PARAMS="-a numbered -a data-uri -a iconsdir=/etc/asciidoc/images/icons -a scriptsdir=/etc/asciidoc/javascripts -b html5 -a toc -a toclevels=4 -a icons -a stylesheet=$(pwd)/theme/debian-asciidoc.css" [ about.html -nt README ] || asciidoc $ASCIIDOC_PARAMS -o about.html README |