Skip SSH key setup for root user

master
Jordan Atwood 2 years ago
parent a4881c053a
commit 39dc4d76a6
Signed by: nightfirecat
GPG Key ID: 615A619C2D73A6DF
  1. 5
      ssh.sh

@ -1,6 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
# don't require ssh key setup if user is root
if [ "$EUID" -eq 0 ]; then
return
fi
# set 0600 permissions on config file # set 0600 permissions on config file
# (setting permissions on a symlink does nothing; see chmod(1)) # (setting permissions on a symlink does nothing; see chmod(1))
chmod 0600 "$( dirname "$(readlink -f "${BASH_SOURCE[0]}")" )/src/.ssh/config" chmod 0600 "$( dirname "$(readlink -f "${BASH_SOURCE[0]}")" )/src/.ssh/config"

Loading…
Cancel
Save