fix if not root thing

This commit is contained in:
askiiart 2025-07-08 12:14:22 -05:00
parent c4bded3f65
commit 75b559edb8
Signed by untrusted user who does not match committer: askiiart
GPG key ID: 6A32977DAF31746A

View file

@ -2,7 +2,7 @@
set -euo pipefail
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
if [ $(whoami) -ne "root"]; then
if [ $(whoami) != "root" ]; then
echo "not root, exiting"
fi
@ -66,6 +66,7 @@ unset IFS
exportfs -arv
systemctl enable --now nfs-server
### SSH keys ###
IFS=$'\n'
for key in $(jq '."ssh-keys"[]?' $SCRIPT_DIR/data.json -r); do
if ! grep -q "$key" $HOME/.ssh/authorized_keys; then