Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. if test -f "/Library/Application Support/Eltima/eveusbd/bin/uninstall"
  4. then
  5. echo "eveusb: uninstalling USB To Ethernet Connector 1.x"
  6. /Library/Application\ Support/Eltima/eveusbd/bin/uninstall || true
  7. fi
  8.  
  9. if test -f "/Library/Frameworks/EveUSB.framework/Support/uninstall"
  10. then
  11. echo "eveusb: uninstalling USB Network Gate 2.x"
  12. /Library/Frameworks/EveUSB.framework/Support/uninstall || true
  13. fi
  14.  
  15. COUNTER=0
  16.  
  17. while true; do
  18. DAEMONS=`ps ax | grep -v grep | grep -c eveusbd`
  19.  
  20. if test $DAEMONS -gt 0; then
  21. echo "eveusb: trying to terminate daemon"
  22.  
  23. launchctl remove com.eltima.eveusbd || launchctl remove com.eltima.eveusb.daemon || killall -u root -c eveusbd || true
  24.  
  25. let COUNTER=COUNTER+1
  26.  
  27. if test $COUNTER -eq 10; then
  28. echo "eveusb: killing daemon"
  29. killall -u root -c eveusbd -KILL
  30. fi
  31.  
  32. if test $COUNTER -gt 10; then
  33. echo "eveusb: cant stop daemon"
  34. break
  35. fi
  36.  
  37. sleep 1
  38. else
  39. break
  40. fi
  41. done
  42.  
  43. if test -d "/Library/Application Support/Eltima/eveusbd"
  44. then
  45. echo "eveusb: clearing old configuratiins"
  46. rm -fr "/Library/Application Support/Eltima/eveusbd"
  47. fi
  48.  
  49. if test -f "/var/log/eveusbd.log"
  50. then
  51. echo "eveusb: clearing old log file"
  52. rm -fr "/var/log/eveusbd.log"
  53. fi
  54.  
  55. if test -f "/var/log/com.eltima.eveusb.daemon.log"
  56. then
  57. echo "eveusb: clearing log file"
  58. rm -fr "/var/log/com.eltima.eveusb.daemon.log"
  59. fi
  60.  
  61. rm -fr /var/tmp/com.eltima.eveusbd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement