dependencies.sh 900 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. #2015 - Whistle Master
  3. #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
  4. #export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
  5. [[ -f /tmp/Deauth.progress ]] && {
  6. exit 0
  7. }
  8. touch /tmp/Deauth.progress
  9. if [ "$1" = "install" ]; then
  10. if [ "$2" = "internal" ]; then
  11. opkg update
  12. opkg install mdk3
  13. elif [ "$2" = "sd" ]; then
  14. opkg update
  15. opkg install mdk3 --dest sd
  16. fi
  17. touch /etc/config/deauth
  18. echo "config deauth 'run'" > /etc/config/deauth
  19. echo "config deauth 'settings'" >> /etc/config/deauth
  20. echo "config deauth 'autostart'" >> /etc/config/deauth
  21. echo "config deauth 'module'" >> /etc/config/deauth
  22. uci set deauth.settings.mode='normal'
  23. uci commit deauth.settings.mode
  24. uci set deauth.module.installed=1
  25. uci commit deauth.module.installed
  26. elif [ "$1" = "remove" ]; then
  27. opkg remove mdk3
  28. rm -rf /etc/config/deauth
  29. fi
  30. rm /tmp/Deauth.progress