Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Title: color-bash.sh
- # Author: Seth Wahle
- # Contact: Seth [at] cyberdonix.com Twitter: @SethWahle
- # comments:
- #requires two files called access_yes(containing access.ini opened configuration) and access_no(containing access.ini closed #configuration) to be present in the same folder as access.ini and this script
- STR=$(cat access.ini | head -n1| cut -c4)
- GOOD=$(cat access_yes)
- BAD=$(cat access_no)
- echo $STR
- if [ $STR = 0 ]
- then
- echo -e "\x1B[31m Access Opened \x1B[0m"
- echo "$GOOD" > access.ini
- else
- echo -e "\x1B[32m Access Closed \x1B[0m"
- echo "$BAD" > access.ini
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement