aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-04-15 17:00:27 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-04-15 17:00:27 -0400
commit34a188a5f15008c0d416ff7a69f01ed79298e259 (patch)
treef8697c2ca201cc96974f6468762f21e7cbd586b3
parenta5e31bbb9281ba94ada1aa9568f0f83b61ee98a5 (diff)
improved grep
-rwxr-xr-xbuild.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index a4c157b..d94443e 100755
--- a/build.sh
+++ b/build.sh
@@ -8,10 +8,10 @@ cat services | xargs systemctl enable
ip link
export USER=czar
-grep "$USER" /etc/passwd || useradd -m $USER
+grep "^$USER" /etc/passwd || useradd -m $USER
usermod $USER -aG wheel -s /bin/zsh
timedatectl set-ntp true
-echo | sudo -u czar ssh-keygen
+if [ ! -e /home/$USER/.ssh/id_rsa ]; then sudo -u $USER ssh-keygen; fi
sh regional.sh # Region specific setup
hwclock --systohc