From 7032b4974c6b613f1c02d0d90b5e2861d0bfc23a Mon Sep 17 00:00:00 2001 From: Bradley Bickford Date: Mon, 11 Dec 2023 20:12:23 -0500 Subject: [PATCH] The IP lookup seems to have a space in it --- setup_user.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_user.sh b/setup_user.sh index 1cc8ebe..e8ee3db 100755 --- a/setup_user.sh +++ b/setup_user.sh @@ -108,7 +108,7 @@ su -c "cp -f $SCRIPTDIR/config.yaml ~/.config/code-server" "$USERNAME" echo "Setting specific user configs" -IP="$(hostname -I | head -n 1)" +IP="$(hostname -I | head -n 1 | tr -d ' ')" NEW_PASS="$(tr -dc A-Za-z0-9 < /dev/urandom | head -c 20; echo)" su -c "sed -i 's/IPADDRESS:PORT/$IP:$PORT/g;s/PASSWORD/$NEW_PASS/g;' ~/.config/code-server/config.yaml" "$USERNAME"