Advertisement
Guest User

Untitled

a guest
Jan 29th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  4. printenv
  5. unixtime="`date +%s`"
  6.  
  7. /usr/bin/python /home/pi/ldr/ldr-adc.py &> /tmp/test.out
  8. light="`/usr/bin/python /home/pi/ldr/ldr-adc.py`"
  9. echo $? > /tmp/test2.out
  10.  
  11. echo $light > /dev/shm/light.log
  12. echo $light
  13. mysql --host=192.168.1.2 --user=user --password=pass light -e"insert into light1 (time, light) values ('$unixtime', '$light')"
  14.  
  15. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement