From 91f4cef2690dd2c2bdff2f551f80920ccf55cdd7 Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Mon, 21 Oct 2019 15:08:55 +0200 Subject: [PATCH] done with the lego demo --- application/device/smartindustry/crontab | 2 ++ application/device/smartindustry/start.sh | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 application/device/smartindustry/crontab diff --git a/application/device/smartindustry/crontab b/application/device/smartindustry/crontab new file mode 100644 index 00000000..80b4d9e3 --- /dev/null +++ b/application/device/smartindustry/crontab @@ -0,0 +1,2 @@ +@reboot sleep 60 && /home/pi/go/src/github.com/smartfog/fogflow/application/device/smartindustry/start.sh & + diff --git a/application/device/smartindustry/start.sh b/application/device/smartindustry/start.sh index 42525964..6da275f2 100755 --- a/application/device/smartindustry/start.sh +++ b/application/device/smartindustry/start.sh @@ -1,11 +1,15 @@ +cd /home/pi/go/src/github.com/smartfog/fogflow/application/device/smartindustry + echo "start pushbutton" -sudo python /home/pi/go/src/github.com/smartfog/fogflow/application/device/smartindustry/button.py & > /home/pi/button.log 2>&1 +#sudo python /home/pi/go/src/github.com/smartfog/fogflow/application/device/smartindustry/button.py & > /home/pi/button.log 2>&1 +sudo python button.py > /tmp/button.log & echo "start camera" -sudo python /home/pi/go/src/github.com/smartfog/fogflow/application/device/smartindustry/camera.py & > /home/pi/camera.log 2>&1 +#sudo python /home/pi/go/src/github.com/smartfog/fogflow/application/device/smartindustry/camera.py & +sudo python camera.py > /tmp/camera.log & echo "start motor" -sudo python /home/pi/go/src/github.com/smartfog/fogflow/application/device/smartindustry/motor.py & > /home/pi/motor.log 2>&1 +#sudo python /home/pi/go/src/github.com/smartfog/fogflow/application/device/smartindustry/motor.py & > /home/pi/motor.log 2>&1 +sudo python motor.py > /tmp/motor.log & echo "already set up everything" -