Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. root@OpenWrt:/usr/share/3ginfo/cgi-bin# cat limit1.sh
  2. #!/bin/sh
  3.  
  4. DEVICE=$(uci get 3ginfo.@3ginfo[0].device1)
  5. SCRIPT=$(uci get 3ginfo.@3ginfo[0].script1)
  6.  
  7. echo -e "Content-type: text/html\n\n"
  8. if [ -e scripts/$SCRIPT.sh ]; then
  9. sh scripts/$SCRIPT.sh
  10. elif [ -e scripts/$SCRIPT.gcom ]; then
  11. if ! pidof gcom > /dev/null; then
  12. O=$(gcom -d $DEVICE -s scripts/$SCRIPT.gcom)
  13. echo "<div class=\"c\">$O</div>"
  14. else
  15. echo "<div class=\"c\">Brak możliwości sprawdzenia limitu. Spróbuj za chwilę.</div>"
  16. fi
  17. else
  18. echo "<div class=\"c\"><font color=red>Brak skryptu $SCRIPT</font></div>"
  19. fi
  20. echo "<div class=\"c\"><input type=\"button\" class=\"button\" value=\"Wróć\" onclick=\"trzyginfo('cgi-bin/3ginfo1.sh');\"></div>"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement