2020-11-25 16:58:32 +01:00
|
|
|
#!/bin/bash
|
2020-11-27 11:53:21 +01:00
|
|
|
log="logger -t update.sh -s "
|
2020-11-25 16:58:32 +01:00
|
|
|
|
2020-11-27 11:53:21 +01:00
|
|
|
${log} "Updating the main repository"
|
2020-11-25 16:58:32 +01:00
|
|
|
cd /home/pi/PlanktonScope
|
|
|
|
|
2020-11-27 11:58:01 +01:00
|
|
|
echo "Update output:\n"
|
|
|
|
sudo killall -15 raspimjpeg
|
|
|
|
sudo killall -15 python3
|
2020-11-25 16:58:32 +01:00
|
|
|
git stash
|
|
|
|
git pull
|
2020-11-27 11:58:01 +01:00
|
|
|
git checkout stash@{0} -- config.json hardware.json
|
|
|
|
sudo systemctl restart nodered.service
|
2020-11-27 11:53:21 +01:00
|
|
|
${log} "Done!"
|