fix grep
This commit is contained in:
parent
c203a0727a
commit
9ec1082d2c
|
@ -10,9 +10,9 @@ grep jenkins /etc/passwd >/dev/null 2>&1 || useradd jenkins -g jenkins -G docker
|
||||||
|
|
||||||
[[ ! -d '/home/jenkins/.ssh' ]] && mkdir /home/jenkins/.ssh || echo '/home/jenkins/.ssh exists'
|
[[ ! -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' /home/jenkins/.ssh/authorized_keys >/dev/null 2>&1 || echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDZzcq/InUD3bbrVC+7HzIjhaiz8Nc21ZO1Wu6OsVijs jenkins@localhost.thelinuxpro.net' >> /home/jenkins/.ssh/authorized_keys
|
||||||
|
|
||||||
chown -R jenkins.jenkins /home/jenkins/.ssh
|
chown -R jenkins:jenkins /home/jenkins/.ssh
|
||||||
chmod -R 0700 /home/jenkins/.ssh
|
chmod -R 0700 /home/jenkins/.ssh
|
||||||
|
|
||||||
usermod -a -G docker kkenny
|
usermod -a -G docker kkenny
|
||||||
|
|
Loading…
Reference in New Issue