Welcome screen ssh connection .bashrc

Post Reply
guihome
Posts: 1
Joined: Sunday 19 March 2017 19:37
Target OS: Raspberry Pi
Domoticz version:
Contact:

Welcome screen ssh connection .bashrc

Post by guihome » Sunday 19 March 2017 19:48

Hello group

I took the time to participate in the great Domoticz adventure. Thanks to the creator

This is a scrip inspired by Retropie when you connect from ssh.
Feel free to comment/improve i'm a beginner.
Image

you have to edit .bashrc

Code: Select all

nano /home/pi/.bashrc
Copy the code

Code: Select all


echo "$(tput setaf 2)
/////    ////    /     /    ////   ///////   /////  //////   //////
/    /  /    /   //   //   /    /     /        |    /            /
/    /  /    /   / / / /   /    /     /        |    /           /
/    /  /    /   /  /  /   /    /     /        |    /          /
/    /  /    /   /     /   /    /     /        |    /         /
/////    ////    /     /    ////      /      /////  //////   //////

`date +"%A, %e %B %Y, %r"`
`uname -srmo`$(tput setaf 1)
Uptime.............: `exec --  uptime -p`
Memory.............: `cat /proc/meminfo | grep MemFree | awk {'print $2'}`kB (Free) / `cat /proc/meminfo | grep MemTotal | awk {'print $2'}`kB (Total)
Running Processes..: `ps ax | wc -l | tr -d " "`
IP Addresses.......: `sudo hostname -I`
Free Disk Space SD.: `df -Pk | grep -E '/root' | awk '{ print $4 }' | awk -F '.' '{ print $1 }'`k on /root
CPU Temperature....: `exec -- /opt/vc/bin/vcgencmd measure_temp | cut -c "6-9"` C
$(tput setaf 2)
Domoticz Service status : `sudo service domoticz.sh status | grep Active | cut -c "11-54"`

"

User avatar
DewGew
Posts: 258
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi
Domoticz version: V4.9741
Location: Sweden
Contact:

Re: Welcome screen ssh connection .bashrc

Post by DewGew » Thursday 04 May 2017 15:53

Great I need that. Is it possible to add more services status like homebrige and watchdog etc?
Raspberry Pi 2B - domoticz - Aeon Labs Z-Stick GEN5 - RFlink gateway
NanoPi NEO-air - domoticz - REGO6XX interface
Dashticz V2 - Homebridge

User avatar
htilburgs
Posts: 509
Joined: Tuesday 03 November 2015 12:01
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Welcome screen ssh connection .bashrc

Post by htilburgs » Thursday 04 May 2017 16:12

DewGew wrote:Great I need that. Is it possible to add more services status like homebrige and watchdog etc?
Just add lines at the end of the script (before the ")

Code: Select all

Homebridge Service status : `sudo service homebridge status | grep Active | cut -c "11-54"`
Watchdog Service status : `sudo service watchdog status | grep Active | cut -c "11-54"`

Hardware:
RPi3 - Aeon Labs Z-Stick GEN5 - Fibaro Dimmer 2 - Fibaro Roller Shutter 2 - Fibaro Smoke Sensor - Yeelight RGBW Led bulb - Yeelight Smart LED Light Strip - Neo Coolcam PIR Motion Sensor - Neo Coolcam PowerPlug - Nest Thermostat v3

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests