2

This following message shows up whenever I login via ssh.

  System load:  0.23               Processes:           163
  Usage of /:   24.1% of 58.39GB   Users logged in:     0
  Memory usage: 27%                IP address for eth0: 192.168.100.82
  Swap usage:   0%    
 * MicroK8s is Kubernetes in a snap. Made by devs for devs.
   One quick install on a workstation, VM, or appliance.   
Current zen blocks are synced at 
Last login: Wed Dec  5 09:52:41 2018 from 192.168.100.71

I added some script at /etc/update-motd.d/ to add some more message that I need it show whenever there is an ssh login.

When I run run-parts /etc/update-motd.d/ it works fine like following output:

+ printf Current zen blocks are synced at "blocks": 424076,

But when I exit and login again the message does not show up. Output below:

Current zen blocks are synced at

here is what I have added

#!/bin/sh
set -x
printf "Current zen blocks are synced at $(/usr/bin/zen-cli getinfo | grep blocks)"
3
  • Where is it supposed to show up? Dec 5, 2018 at 10:11
  • When i login via ssh
    – Rakib Fiha
    Dec 5, 2018 at 10:12
  • Where, terminal, file etc??? Dec 5, 2018 at 10:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.