From dcf95a859126ee63e97a81803c2dfe774ed30d28 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 8 Nov 2023 03:31:19 +0100 Subject: [PATCH] feat: Display info message --- run/print.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 run/print.sh diff --git a/run/print.sh b/run/print.sh new file mode 100644 index 0000000..832afa0 --- /dev/null +++ b/run/print.sh @@ -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 ""