diff options
author | Holger Levsen <holger@layer-acht.org> | 2017-06-02 01:09:08 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-06-02 01:09:08 +0200 |
commit | 2bff201a7737f58a843fd5f052806aca9cb9abb7 (patch) | |
tree | 381e3ab38d0e4eeb7e13a3eac6d465b4c228df59 /update_jdn.sh | |
parent | 9835ec34e6a945e4163242d0aed30a006c29f99c (diff) | |
download | jenkins.debian.net-2bff201a7737f58a843fd5f052806aca9cb9abb7.tar.xz |
reproducible Debian: new script, init_node, to initialize new build nodes
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'update_jdn.sh')
-rwxr-xr-x | update_jdn.sh | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/update_jdn.sh b/update_jdn.sh index fd40d0d8..8c8d403f 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -18,6 +18,8 @@ # # so, yes, patches welcome. saying this is crap alone is not helpful, # nor is just suggesting some new or old technology. patches most welcome! +# +# that said, there's a new one: init_node ;) set -e @@ -84,25 +86,7 @@ esac # # set up users and groups # -if ! getent passwd jenkins > /dev/null ; then - sudo addgroup --system jenkins - sudo adduser --system --shell /bin/bash --home /var/lib/jenkins --ingroup jenkins --disabled-login jenkins -fi -if ! getent group jenkins-adm > /dev/null ; then - sudo addgroup --system jenkins-adm -fi -if ! getent passwd jenkins-adm > /dev/null ; then - sudo adduser --system --shell /bin/bash --home /home/jenkins-adm --ingroup jenkins-adm --disabled-login jenkins-adm - sudo usermod -G jenkins jenkins-adm -fi -if [ ! -d /home/jenkins-adm ]; then - sudo mkdir /home/jenkins-adm - sudo chown jenkins-adm.jenkins-adm /home/jenkins-adm -fi - - declare -A user_host_groups u_shell - sudo_groups='jenkins,jenkins-adm,sudo,adm' # if there's a need for host groups, a case statement on $HOSTNAME here that sets $GROUPNAME, say, should do the trick |