summaryrefslogtreecommitdiffstats
path: root/server/ipxe/bash_scripts/addServer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'server/ipxe/bash_scripts/addServer.sh')
-rwxr-xr-xserver/ipxe/bash_scripts/addServer.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/ipxe/bash_scripts/addServer.sh b/server/ipxe/bash_scripts/addServer.sh
index 13f81d1..ad6e3aa 100755
--- a/server/ipxe/bash_scripts/addServer.sh
+++ b/server/ipxe/bash_scripts/addServer.sh
@@ -9,7 +9,7 @@ json_data()
"type": "SERVER",
"uuid": "$(dmidecode -q -s system-uuid | grep -v '^#' | head -n 1 | tr '[a-z]' '[A-Z]')",
"network": {
- "mac": "$(cat /sys/class/net/ens3/address)",
+ "mac": "$(ip addr show | grep -Eo -m 1 'ether\s.*\sbrd' | awk '{print $2}')",
"ip": "$(hostname -I | awk '{print $1}')"
},
"location": {
@@ -27,5 +27,5 @@ json_data()
EOF
}
-#curl -d "$(json_data)" -H "Content-Type: application/json" -X POST --insecure https://bas.intra.uni-freiburg.de/api/registration
-curl --data "$(json_data)" -H "Content-Type: application/json" -X POST --insecure https://bas.stfu-kthx.net:8888/api/registration \ No newline at end of file
+curl -d "$(json_data)" -H "Content-Type: application/json" -X POST --insecure https://bas.intra.uni-freiburg.de/api/registration
+# curl --data "$(json_data)" -H "Content-Type: application/json" -X POST --insecure https://bas.stfu-kthx.net:8888/api/registration \ No newline at end of file