Commit 677432ce authored by Joanne Hugé's avatar Joanne Hugé

Improve get-host-ID script

parent 8145ecb3
#!/bin/bash #!/bin/bash
/root/mme/ltemme /root/mme/config/mme.cfg 2>&1 >/dev/null | grep "Host ID" | awk '{print $3;}' for SOFT in enb ue mme; do
if [ -f "/root/.amarisoft/lte$SOFT.key" ]; then
cat /root/.amarisoft/lte$SOFT.key | tail -c+261| head -n1;
exit;
fi
done
if [ "$#" -eq 2 ]; then
BINARY_PATH="$1"
BINARY_CONFIG="$2"
$BINARY_PATH $BINARY_CONFIG 2>&1 >/dev/null | grep "Host ID" | awk '{print $3;}'
exit;
fi
for SOFT in mme ue enb; do
if [ -f "/root/$SOFT/lte$SOFT" ]; then
/root/$SOFT/lte$SOFT /root/$SOFT/config/$SOFT.cfg 2>&1 >/dev/null | grep "Host ID" | awk '{print $3;}'
exit
fi
done
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment