fix if not root thing
This commit is contained in:
parent
c4bded3f65
commit
75b559edb8
1 changed files with 2 additions and 1 deletions
3
setup.sh
3
setup.sh
|
@ -2,7 +2,7 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||||
|
|
||||||
if [ $(whoami) -ne "root"]; then
|
if [ $(whoami) != "root" ]; then
|
||||||
echo "not root, exiting"
|
echo "not root, exiting"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ unset IFS
|
||||||
exportfs -arv
|
exportfs -arv
|
||||||
systemctl enable --now nfs-server
|
systemctl enable --now nfs-server
|
||||||
|
|
||||||
|
### SSH keys ###
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
for key in $(jq '."ssh-keys"[]?' $SCRIPT_DIR/data.json -r); do
|
for key in $(jq '."ssh-keys"[]?' $SCRIPT_DIR/data.json -r); do
|
||||||
if ! grep -q "$key" $HOME/.ssh/authorized_keys; then
|
if ! grep -q "$key" $HOME/.ssh/authorized_keys; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue