Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
added dynmotd
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ Asghar committed Jul 30, 2012
1 parent 802b9f1 commit 7a1b5c6
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions dynmotd
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/local/bin/bash
PROCCOUNT=`ps -Afl | wc -l`
PROCCOUNT=`expr $PROCCOUNT - 5`
NIC=em0
IPADDY=`ifconfig $NIC | grep inet | awk -F " " '{print $2}' | grep -v ::`
DATE=`date +%F`
EPOCH=`date +%s`

echo -e "
#################################################################################
WARNING:- YOU MUST HAVE PRIOR AUTHORIZATION TO ACCESS THIS SYSTEM. ALL
CONNECTIONS ARE LOGGED AND MONITORED. BY CONNECTING TO THIS SYSTEM YOU FULLY
CONSENT TO ALL MONITORING. UN-AUTHORIZED ACCESS OR USE WILL BE PROSECUTED TO
THE FULL EXTENT OF LAW. YOU HAVE BEEN WARNED
#################################################################################
"

echo -e "
+++++++++++++++++++++++++++++++++: System Data :++++++++++++++++++++++++++++++++++
+ hostname = `hostname`
+ address = $IPADDY
+ os type = `uname -s`
+ kernel = `uname -r`
+ uptime = `uptime | sed 's/.*up ([^,]*), .*/1/'`
++++++++++++++++++++++++++++++++: User Data :+++++++++++++++++++++++++++++++++++++
+ username = `whoami`
+ processes = $PROCCOUNT of `ulimit -u`
+++++++++++++++++++++++++++: Helpful Information :++++++++++++++++++++++++++++++++
+ admin = [email protected]
+ date = $DATE
+ epoch = $EPOCH
+++++++++++++++++++++++++: Maintenance Information :++++++++++++++++++++++++++++++
+ `cat /etc/motd-maint`
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
"

0 comments on commit 7a1b5c6

Please sign in to comment.