Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- RED='\033[0;31m'
- NC='\033[0m' # No Color
- if [ "$(date | awk '{print $5}')" != "IST" ]
- then
- printf "${RED}TIMING IS INCORRECT${NC}, Correcting back to IST\n"
- rm -f /etc/localtime
- ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
- /usr/sbin/ntpdate -u in.pool.ntp.org
- else
- printf "${RED}ALL OK${NC}, Date and time is proper\n"
- /usr/sbin/ntpdate -u in.pool.ntp.org
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement