Commit 29c533f1 authored by Dorian Zedler's avatar Dorian Zedler

some minor updates to startup scripts

parent 5c1c68a1
......@@ -55,7 +55,8 @@ cd "$parent_path"
function doScStwUpdate {
# check if there is a new version available
UPDATE_FILE=./bin/speed_climbing_stopwatch_basestation-update.zip
UPDATE_FILENAME=ScStwBasestation-update.zip
UPDATE_FILE=./bin/"$UPDATE_FILENAME"
if [ -f "$UPDATE_FILE" ]; then
echo "UPDATE FOUND"
......@@ -68,7 +69,7 @@ function doScStwUpdate {
fi
# move the new version archive out of the bin dir
mv ./bin/speed_climbing_stopwatch_basestation-update.zip ./
mv "$UPDATE_FILE" ./
# backup the old version
mv ./bin "$OLD_VER_DIR"
......@@ -77,11 +78,14 @@ function doScStwUpdate {
mkdir ./bin
# move the new version archive there and unpack it
mv speed_climbing_stopwatch_basestation-update.zip ./bin
unzip ./bin/speed_climbing_stopwatch_basestation-update.zip -d ./bin
mv ./"$UPDATE_FILENAME" ./bin
unzip "$UPDATE_FILE" -d ./bin
# remove the new version archive
rm ./bin/speed_climbing_stopwatch_basestation-update.zip
rm "$UPDATE_FILE"
# fix file permissions
chmod -R 777 /home/pi/ScStwBasestation
echo "UPDATE DONE"
fi
......@@ -89,12 +93,12 @@ function doScStwUpdate {
doScStwUpdate
sudo LD_LIBRARY_PATH=./bin/ ./bin/speed_climbing_stopwatch_basestation
sudo LD_LIBRARY_PATH=./bin/lib ./bin/ScStwBasestation
```
- Create the file /home/pi/StartScStw.sh with content:
```
#!/bin/bash
sudo /home/pi/speed_climbing_stopwatch_basestation/start.sh &
sudo /home/pi/ScStwBasestation/start.sh &
sudo xinit /home/pi/ScStwMonitor/start.sh &
```
- Create the file /home/pi/ScStwMonitor/bin/start.sh with content:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment