Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- echo -n >/var/run/motd
- cat /etc/motd.tail >> /var/run/motd
- echo 'Welcome to my server!' >> /var/run/motd
- echo -n "Operating system : " >> /var/run/motd
- lsb_release -d | tr -s ' '| tr -d '\t'| cut -f2 -d: >> /var/run/motd
- echo -n "Hostname: " >> /var/run/motd
- hostname >> /var/run/motd
- if [ -e /var/run/reboot-required ]
- then
- echo "Reboot Required : Yes " >> /var/run/motd
- fi
- echo "Network : " >> /var/run/motd
- ifconfig | grep 'inet addr' | grep -v 127.0.0.1 >> /var/run/motd
- echo "" >> /var/run/motd
- echo "" >> /var/run/motd
- if [ -h "/etc/motd" ]
- then
- echo "Symbolic link!"
- else
- cp /var/run/motd /etc/motd
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement