Created
March 22, 2016 21:23
-
-
Save agusmakmun/fde3151a1a5b0fcdb06a to your computer and use it in GitHub Desktop.
Simple bash scripting for login before open the terminal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### =============================================== | |
### Simple bash scripting for login before open the terminal. | |
### Credit: <Summon Agus> - [email protected] | |
### Location, end script of: /etc/bash.bashrc | |
### =============================================== | |
while true; do | |
# Don't exit at Ctrl-C | |
trap "echo" SIGINT | |
printf "\n" | |
echo -n " Who are you guys? "; read -s name; | |
if [ "$name" == "agus" ]; then | |
reset | |
printf "\n Welcome my KING! you are the best!!\n" | |
printf " "; date; | |
printf " Please start your activity with Basmalah\n\n" | |
break | |
else | |
printf "\n Heey you! why you here!! You are not owner of this machine!\n" | |
fi | |
done | |
### =============================================== | |
### END | |
### =============================================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment