Guest User

Untitled

a guest
May 13th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.79 KB | None | 0 0
  1. ======== /usr/local/bin/camera.sh ==============
  2. #!/bin/sh
  3.  
  4. if [ -f /tmp/camera ]; then
  5.     sudo chmod a+r /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/Resources/VDC.plugin/Contents/MacOS/VDC
  6.     sudo chmod a+r /System/Library/PrivateFrameworks/CoreMediaIOServicesPrivate.framework/Versions/A/Resources/AVC.plugin/Contents/MacOS/AVC
  7.     sudo chmod a+r /System/Library/QuickTime/QuickTimeUSBVDCDigitizer.component/Contents/MacOS/QuickTimeUSBVDCDigitizer
  8.     sudo chmod a+r /Library/CoreMediaIO/Plug-Ins/DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
  9.     sudo chmod a+r /Library/CoreMediaIO/Plug-Ins/FCP-DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
  10.     rm -f /tmp/camera
  11. else
  12.     sudo chmod a-r /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/Resources/VDC.plugin/Contents/MacOS/VDC
  13.     sudo chmod a-r /System/Library/PrivateFrameworks/CoreMediaIOServicesPrivate.framework/Versions/A/Resources/AVC.plugin/Contents/MacOS/AVC
  14.     sudo chmod a-r /System/Library/QuickTime/QuickTimeUSBVDCDigitizer.component/Contents/MacOS/QuickTimeUSBVDCDigitizer
  15.     sudo chmod a-r /Library/CoreMediaIO/Plug-Ins/DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
  16.     sudo chmod a-r /Library/CoreMediaIO/Plug-Ins/FCP-DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
  17.     echo "off" > /tmp/camera
  18.  
  19.  
  20. ======== /usr/local/bin/camera.sh ==============
  21. sudo groupadd cameramaster
  22. usermod -a -G cameramaster USERYA
  23. usermod -a -G cameramaster USERWIFE
  24. chown USERYA:cameramaster /usr/local/bin/camera.sh
  25. chmod g+s /usr/local/bin/camera.sh
  26.  
  27. ======
  28.  
  29. Создаем скрипт Automator, с одним действием "запустить shell-скрипт", сохраняем как службу, теперь вешаем на него хоткей.
  30.  
  31. ====
  32.  
  33. Ебать, блядь, мак-ос юзер-френдлее некуда.
Advertisement
Add Comment
Please, Sign In to add comment