Merge pull request #17803 from mfine/mfine-always-write-ssh-keys
buildkite-agent: always write ssh keys
This commit is contained in:
commit
65ef681c94
|
@ -77,15 +77,11 @@ in
|
|||
preStart = ''
|
||||
${pkgs.coreutils}/bin/mkdir -m 0700 -p /var/lib/buildkite-agent/.ssh
|
||||
|
||||
if ! [ -f /var/lib/buildkite-agent/.ssh/id_rsa ]; then
|
||||
echo "${cfg.openssh.privateKey}" > /var/lib/buildkite-agent/.ssh/id_rsa
|
||||
${pkgs.coreutils}/bin/chmod 600 /var/lib/buildkite-agent/.ssh/id_rsa
|
||||
fi
|
||||
echo "${cfg.openssh.privateKey}" > /var/lib/buildkite-agent/.ssh/id_rsa
|
||||
${pkgs.coreutils}/bin/chmod 600 /var/lib/buildkite-agent/.ssh/id_rsa
|
||||
|
||||
if ! [ -f /var/lib/buildkite-agent/.ssh/id_rsa.pub ]; then
|
||||
echo "${cfg.openssh.publicKey}" > /var/lib/buildkite-agent/.ssh/id_rsa.pub
|
||||
${pkgs.coreutils}/bin/chmod 600 /var/lib/buildkite-agent/.ssh/id_rsa.pub
|
||||
fi
|
||||
echo "${cfg.openssh.publicKey}" > /var/lib/buildkite-agent/.ssh/id_rsa.pub
|
||||
${pkgs.coreutils}/bin/chmod 600 /var/lib/buildkite-agent/.ssh/id_rsa.pub
|
||||
'';
|
||||
|
||||
serviceConfig =
|
||||
|
|
Loading…
Reference in a new issue