sudo find /etc/update-motd.d/ -type f ! -name "50-landscape-sysinfo" -exec rm {} \;

cat > /etc/update-motd.d/05-logo << 'EOF'
#!/bin/sh
[ -r /etc/lsb-release ] && . /etc/lsb-release

if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
        # Fall back to using the very slow lsb_release utility
        DISTRIB_DESCRIPTION=$(lsb_release -s -d)
fi

printf "Welcome to %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)"
cat /opt/logo
EOF

sudo chmod 755 /etc/update-motd.d/05-logo


if [ ! -f "/opt/logo" ]; then
    wget -O /opt/logo https://sg.hljone.com/logo
fi

sudo run-parts /etc/update-motd.d