From b35b54715066c8e9d8bfd197df73b3b8b63bfed2 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 30 Jul 2015 13:04:11 +0200 Subject: create jenkins group too and use more sudo --- update_jdn.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'update_jdn.sh') diff --git a/update_jdn.sh b/update_jdn.sh index 4e0b8336..fe864bce 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -19,6 +19,7 @@ explain() { # set up users and groups # if ! getent passwd jenkins > /dev/null ; then + sudo addgroup --system jenkins sudo adduser --system --no-create-home --ingroup jenkins --disabled-login jenkins fi if ! getent group jenkins-adm > /dev/null ; then @@ -35,7 +36,7 @@ for user in helmut holger mattia ; do fi done -mkdir -p /srv/workspace +sudo mkdir -p /srv/workspace if [ "$HOSTNAME" = "jenkins" ] ; then if ! grep -q '^tmpfs\s\+/srv/workspace\s' /etc/fstab; then @@ -70,7 +71,7 @@ if ! test -h /chroots; then if test -e /chroots; then explain "could not clear /chroots" else - ln -s /srv/workspace/chroots /chroots + sudo ln -s /srv/workspace/chroots /chroots fi fi @@ -81,7 +82,7 @@ if [ -f /etc/debian_version ] ; then if test -e /var/cache/pbuilder/build; then explain "could not clear /var/cache/pbuilder/build" else - ln -s /srv/workspace/pbuilder /var/cache/pbuilder/build + sudo ln -s /srv/workspace/pbuilder /var/cache/pbuilder/build fi fi @@ -283,7 +284,7 @@ if [ "$HOSTNAME" = "jenkins" ] ; then diff THANKS .THANKS >/dev/null || asciidoc $ASCIIDOC_PARAMS -o thanks.html THANKS mv THANKS .THANKS rm TODO README INSTALL CONTRIBUTING - chown -R jenkins.jenkins /var/lib/jenkins/userContent + sudo chown -R jenkins.jenkins /var/lib/jenkins/userContent explain "Updated user content for Jenkins." # -- cgit v1.2.3-70-g09d2