motioneye-install.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/usr/bin/env bash
  2. # Copyright (c) 2021-2023 tteck
  3. # Author: tteck (tteckster)
  4. # License: MIT
  5. # https://github.com/tteck/Proxmox/raw/main/LICENSE
  6. source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
  7. color
  8. verb_ip6
  9. catch_errors
  10. setting_up_container
  11. network_check
  12. update_os
  13. msg_info "Installing Dependencies"
  14. $STD apt-get install -y curl
  15. $STD apt-get install -y sudo
  16. $STD apt-get install -y mc
  17. $STD apt-get install -y git
  18. $STD apt-get install -y cifs-utils
  19. msg_ok "Installed Dependencies"
  20. msg_info "Updating Python3"
  21. $STD apt-get install -y \
  22. python3 \
  23. python3-dev \
  24. python3-pip
  25. msg_ok "Updated Python3"
  26. msg_info "Installing Motion"
  27. $STD apt-get install -y motion
  28. systemctl stop motion
  29. $STD systemctl disable motion
  30. msg_ok "Installed Motion"
  31. msg_info "Installing FFmpeg"
  32. $STD apt-get install -y ffmpeg v4l-utils
  33. msg_ok "Installed FFmpeg"
  34. msg_info "Installing MotionEye"
  35. $STD apt-get update
  36. $STD pip install git+https://github.com/motioneye-project/motioneye.git@dev
  37. mkdir -p /etc/motioneye
  38. chown -R root:root /etc/motioneye
  39. chmod -R 777 /etc/motioneye
  40. wget -qO /etc/motioneye/motioneye.conf https://raw.githubusercontent.com/motioneye-project/motioneye/dev/motioneye/extra/motioneye.conf.sample
  41. mkdir -p /var/lib/motioneye
  42. msg_ok "Installed MotionEye"
  43. msg_info "Creating Service"
  44. wget -qO /etc/systemd/system/motioneye.service https://raw.githubusercontent.com/motioneye-project/motioneye/dev/motioneye/extra/motioneye.systemd
  45. systemctl enable -q --now motioneye
  46. msg_ok "Created Service"
  47. motd_ssh
  48. customize
  49. msg_info "Cleaning up"
  50. $STD apt-get autoremove
  51. $STD apt-get autoclean
  52. msg_ok "Cleaned"