diff --git a/packages/bsp/common/etc/cron.daily/armbian-quotes b/packages/bsp/common/etc/cron.daily/armbian-quotes new file mode 100755 index 000000000000..f7958c558fb8 --- /dev/null +++ b/packages/bsp/common/etc/cron.daily/armbian-quotes @@ -0,0 +1,3 @@ +#!/bin/bash + +curl --max-time 2 -L -s -o "/tmp/quotes.txt" "https://github.armbian.com/quotes.txt" diff --git a/packages/bsp/common/etc/cron.weekly/armbian-quotes b/packages/bsp/common/etc/cron.weekly/armbian-quotes deleted file mode 100755 index 0d7ec031a013..000000000000 --- a/packages/bsp/common/etc/cron.weekly/armbian-quotes +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -curl -L -s -o "/etc/update-motd.d/quotes.txt" "https://dl.armbian.com/quotes.txt" diff --git a/packages/bsp/common/etc/default/armbian-motd.dpkg-dist b/packages/bsp/common/etc/default/armbian-motd.dpkg-dist index 612c6982e8fa..00e19cc468fa 100644 --- a/packages/bsp/common/etc/default/armbian-motd.dpkg-dist +++ b/packages/bsp/common/etc/default/armbian-motd.dpkg-dist @@ -4,9 +4,9 @@ # ONE_WIRE="yes" show 1-wire temperature sensor if attached # PRIMARY_DIRECTION="rx" show daily traffic stats, options: "rx", "tx", "both", "off", vnstat needs to be installed -MOTD_DISABLE="" +MOTD_DISABLE="clear" ONE_WIRE="" -HIDE_IP_PATTERN="^dummy0|^lo|^docker|^hassio" +HIDE_IP_PATTERN="^dummy0|^lo|^docker|^hassio|^br-|^veth|^vnet|^virbr" PRIMARY_INTERFACE="$(ip route | grep '^default' | sed "s/.*dev //" | cut -d" " -f1)" PRIMARY_DIRECTION="rx" STORAGE=/dev/sda1 diff --git a/packages/bsp/common/etc/update-motd.d/10-armbian-header b/packages/bsp/common/etc/update-motd.d/10-armbian-header index df947c2d56be..b19b30e5490b 100755 --- a/packages/bsp/common/etc/update-motd.d/10-armbian-header +++ b/packages/bsp/common/etc/update-motd.d/10-armbian-header @@ -11,7 +11,7 @@ THIS_SCRIPT="header" MOTD_DISABLE="" -HIDE_IP_PATTERN="^dummy0|^lo|^docker" +HIDE_IP_PATTERN="^dummy0|^lo|^docker|^hassio|^br-|^veth|^vnet|^virbr" # Read image configuration [[ -f /etc/armbian-image-release ]] && . /etc/armbian-image-release @@ -76,8 +76,7 @@ function get_ip_addresses() { [[ -n $ipv6 ]] && ipv6s+=("$ipv6") fi done - - echo "${ipv4s[@]}|${ipv6s[@]}" + echo "${ipv4s[*]}|${ipv6s[*]}" } # get_ip_addresses # Read Armbian kernel version @@ -134,6 +133,11 @@ if [[ $NUM_UPDATES -gt 0 ]]; then UPDATE_STATUS+=" available for upgrade\e[0m " fi +# read running Docker containers if any +if systemctl is-active docker >/dev/null; then + CONTAINERS_STATUS=$(docker ps --format "{{.Names}}" | tr '\n' ',' | sed 's/,/, /g' | sed 's/, $//') +fi + echo "" # Display packages status @@ -160,6 +164,11 @@ if [[ -n $wan_ip_address ]]; then echo -e "\x1B[93m(WAN)\x1B[0m $wan_ip_address" fi +# Display running docker containers +if [[ -n "${CONTAINERS_STATUS}" ]]; then + echo -e " Containers: \x1B[92m$CONTAINERS_STATUS\x1B[0m" +fi + # Display hostapd if [[ -n $ssid ]]; then echo -e " WiFi AP: SSID: (\x1B[91m$ssid\x1B[0m), $(iw $interface info | grep channel | xargs)" diff --git a/packages/bsp/common/etc/update-motd.d/30-armbian-sysinfo b/packages/bsp/common/etc/update-motd.d/30-armbian-sysinfo index c79647217872..b6f1255489f5 100755 --- a/packages/bsp/common/etc/update-motd.d/30-armbian-sysinfo +++ b/packages/bsp/common/etc/update-motd.d/30-armbian-sysinfo @@ -132,8 +132,8 @@ display " Memory usage" "$memory_usage" "70" "0" "%" " of ${memory_total}" display "Zram usage" "$swap_usage" "75" "0" "%" " of ${swap_total}" echo "" # fixed newline display " CPU temp" "$board_temp" $CPU_TEMP_LIMIT "0" "°C" "" -display "Ambient temp" "$amb_temp" $AMB_TEMP_LIMIT "0" "°C" "" -display "Usage of /" "$root_usage" "90" "1" "%" " of $root_total $overlay_root" +display " Ambient temp" "$amb_temp" $AMB_TEMP_LIMIT "0" "°C" "" +display " Usage of /" "$root_usage" "90" "1" "%" " of $root_total $overlay_root" if command -v overlayroot-chroot > /dev/null 2>&1 && findmnt -k /media/root-ro | tail -1 | grep -w /media/root-ro > /dev/null 2>&1; then echo -ne "\x1B[91m(read only rootfs)\x1B[0m" fi