From f6285c8fb9da96452d9428cfbcd5a701a60d5f55 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Sun, 6 May 2018 02:32:40 +0200 Subject: [PATCH] Add hostname and start example_basic on image boot --- scripts/ci/rpi/pisetup.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/ci/rpi/pisetup.sh b/scripts/ci/rpi/pisetup.sh index 7282e9f..979d6b5 100644 --- a/scripts/ci/rpi/pisetup.sh +++ b/scripts/ci/rpi/pisetup.sh @@ -15,4 +15,14 @@ cd .. cd ofxPiMapper/example_basic make -j$(nproc) +echo "Setting hostname." +echo "opm" > /etc/hostname +cat /etc/hostname + +echo "Setting up to run on boot." +crontab -l > mycron +echo "@reboot /home/pi/openFrameworks/addons/ofxPiMapper/example_basic/bin/example_basic" >> mycron +crontab mycron +rm mycron + echo "Done!"