-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup
25 lines (20 loc) · 575 Bytes
/
setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Script to setup RPIC
sudo apt update
sudo mkdir /opt/rpic
sudo chown pi:pi /opt/rpic
sudo apt install git ffmpeg python3-pip python3-gpiozero
git clone https://github.com/Turkey2349/RPIC-Record-and-Stream.git /opt/rpic
sudo pip3 install -r /opt/rpic/requirements.txt
sudo cat <<EOF >/etc/systemd/system/camera.service
[Unit]
Description=RPIC Record and Stream service
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /opt/rpic/main.py
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable camera
sudo systemctl start camera