lot_manager/install.sh

29 lines
831 B
Bash
Raw Permalink Normal View History

2023-12-12 09:52:38 +08:00
#!/bin/bash
set -e
sudo apt update
sudo apt install supervisor
sudo apt install ffmpeg -y
sudo timedatectl set-timezone Asia/Shanghai
2023-12-15 10:09:11 +08:00
sudo apt install git
2023-12-12 09:52:38 +08:00
git config --global credential.helper store
2023-12-15 10:09:11 +08:00
cd /home/pi
2023-12-12 09:52:38 +08:00
git clone https://gitea.lihaink.cn/xyj/lot_manager.git
cd lot_manager
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
2023-12-28 16:54:53 +08:00
sudo pip install Adafruit-Blinka
2023-12-15 10:09:11 +08:00
sudo cp /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf.bak
2023-12-12 09:52:38 +08:00
sudo cp conf/example/supervisord.conf /etc/supervisor/supervisord.conf
sudo chmod 777 /etc/supervisor/conf.d
2023-12-15 10:09:11 +08:00
python /home/pi/lot_manager/create_db.py
mkdir /home/pi/mp4
cd /home/pi
echo 'lihai_lot_walnutpi_dev_1' | tee device_name
sudo systemctl start supervisor
2024-01-31 16:26:27 +08:00
sudo systemctl enable supervisor
2023-12-15 10:09:11 +08:00
sleep 60
2024-01-31 16:26:27 +08:00
sudo systemctl restart supervisor
2023-12-28 16:54:53 +08:00
supervisorctl reload