mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
feat: Display info message
This commit is contained in:
parent
7f7272b7c8
commit
dcf95a8591
20
run/print.sh
Normal file
20
run/print.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
info () { echo -e "\E[1;34m❯\E[1;36m $1\E[0m" ; }
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
IP=$(ip address show dev eth0 | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/)
|
||||||
|
|
||||||
|
if [[ "$IP" == "20.20"* ]]; then
|
||||||
|
MSG="port 5000"
|
||||||
|
else
|
||||||
|
MSG="http://${IP}:5000"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
info "--------------------------------------------------------"
|
||||||
|
info " You can now login to DSM at ${MSG}"
|
||||||
|
info "--------------------------------------------------------"
|
||||||
|
echo ""
|
Loading…
x
Reference in New Issue
Block a user