slcp-opi-zero-installer/install.sh

18 lines
615 B
Bash
Raw Normal View History

2022-11-16 15:21:14 +00:00
echo "Installing Dependencies"
sudo apt update
2022-11-17 09:57:19 +00:00
sudo apt install -y python3 python3-pip python3-scipy python3-numpy
sudo pip3 install pyserial
sudo pip3 install paho-mqtt
sudo pip3 install --no-deps siwat-light-control-protocol
2022-11-17 06:37:50 +00:00
2022-11-17 06:53:29 +00:00
echo "Creating SLCP Working Directory"
sudo cp -rv ./ /slcp
2022-11-16 15:21:14 +00:00
sudo chmod 777 -Rv /slcp
2022-11-17 06:37:50 +00:00
echo "Creating systemd Service"
sudo chmod +x /slcp/jumpstart.sh
sudo ln -v /slcp/slcp.service /lib/systemd/system/slcp.service
sudo systemctl daemon-reload
sudo systemctl enable slcp.service
echo "Installation Completed!"
echo "Adjust /slcp/config.json then run sudo \"systemctl start slcp.service\""