Monday, December 30, 2013

Starting a script after the CPU Linino boot

Just add the script to the /etc/rc.local file

The stdout and stderr get redirected to a log file in /tmp (ramdisk)

My rc.local on the Arduino Yun now looks as follows:


touch /tmp/begin
wifi-live-or-reset
boot-complete-notify
sleep 5s
cd /mnt/sda1/arduino/Yafa
./main.py 1> /tmp/Yafa.log 2>&1 &
touch /tmp/end
exit 0

No comments:

Post a Comment