This commit is contained in:
Kameron Kenny 2024-05-03 11:54:05 -04:00
parent 2a8e020d8e
commit 9171e26685
No known key found for this signature in database
GPG Key ID: E5006629839D2276
3 changed files with 11 additions and 7 deletions

View File

@ -1,7 +1,9 @@
#!/bin/bash #!/bin/bash
# #
apt update -y
apt -y install nfs-common export DEBIAN_FRONTEND=noninteractive
apt update -qy
apt -qy install nfs-common
function create_dir() { function create_dir() {
echo "creating directory: $1" echo "creating directory: $1"
@ -23,4 +25,5 @@ function install_nfs_mnt() {
grep '/var/lib/docker/volumes' >/dev/null || install_nfs_mnt grep '/var/lib/docker/volumes' >/dev/null || install_nfs_mnt
echo ">>>>>>>>>> mounting"
mount -a mount -a

View File

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
grep jenkins /etc/group >/dev/null 2>&1 || sroupadd jenkin grep jenkins /etc/group >/dev/null 2>&1 || groupadd jenkin && echo 'jenkins group exists'
grep jenkins /etc/passwd >/dev/null 2>&1 || useradd jenkins -g jenkins -G docker -m grep jenkins /etc/passwd >/dev/null 2>&1 || useradd jenkins -g jenkins -G docker -m && echo 'jenkins user exists'
[[ ! -d '/home/jenkins/.ssh' ]] && mkdir /home/jenkins/.ssh [[ ! -d '/home/jenkins/.ssh' ]] && mkdir /home/jenkins/.ssh || echo '/home/jenkins/.ssh exists'
grep 'jenkins@localhost.thelinuxpro.net' >/dev/null 2>&1 || echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDZzcq/InUD3bbrVC+7HzIjhaiz8Nc21ZO1Wu6OsVijs jenkins@localhost.thelinuxpro.net' >> /home/jenkins/.ssh/authorized_keys grep 'jenkins@localhost.thelinuxpro.net' >/dev/null 2>&1 || echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDZzcq/InUD3bbrVC+7HzIjhaiz8Nc21ZO1Wu6OsVijs jenkins@localhost.thelinuxpro.net' >> /home/jenkins/.ssh/authorized_keys

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
export DEBIAN_FRONTEND=noninteractive
apt update -y apt update -qy
apt -y upgrade apt -qy upgrade