Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bases/overlay-feature-motd/etc/update-motd.d/50-scw
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ processes=`ps aux | wc -l`
ip=$(scw-metadata --cached PRIVATE_IP)
public_ip=$(scw-metadata --cached PUBLIC_IP_ADDRESS)

if [ -z public_ip ]; then
# Fall back to using the IPv6 address
public_ip=$(scw-metadata --cached IPV6_ADDRESS)
fi

metadata() {
scw-metadata --cached "$1"
}
Expand Down