Welcome screen ssh connection .bashrc

Moderator: leecollings

Post Reply
guihome
Posts: 2
Joined: Sunday 19 March 2017 18:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Welcome screen ssh connection .bashrc

Post by guihome »

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: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Welcome screen ssh connection .bashrc

Post by DewGew »

Great I need that. Is it possible to add more services status like homebrige and watchdog etc?
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
User avatar
htilburgs
Posts: 464
Joined: Tuesday 03 November 2015 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Welcome screen ssh connection .bashrc

Post by htilburgs »

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 1 guest