daily pastebin goal
83%
SHARE
TWEET

RuTorrent-access-swap.sh

osteth Apr 14th, 2016 (edited) 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # Title: color-bash.sh
  4. # Author: Seth Wahle
  5. # Contact: Seth [at] cyberdonix.com  Twitter: @SethWahle
  6. # comments:
  7. #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
  8.  
  9. STR=$(cat access.ini | head -n1| cut -c4)
  10. GOOD=$(cat access_yes)
  11. BAD=$(cat access_no)
  12.  
  13. echo $STR
  14.  
  15. if [ $STR = 0 ]
  16. then
  17.         echo -e "\x1B[31m Access Opened \x1B[0m"
  18.         echo "$GOOD" > access.ini
  19. else
  20.         echo -e "\x1B[32m Access Closed \x1B[0m"
  21.         echo "$BAD" > access.ini
  22. fi
RAW Paste Data
Top