I have a script in which I need to firstly upgrade the kernel to an older version to run the WiringPi library with my sensor.
Does anybody have an effective way of restarting the script automatically after this? It would just be a convenience to run one file and have it set itself up.
Here is the script below:
Thanks in advance!
Code: Select all
sudo rpi-update 52241088c1da59a359110d39c1875cda56496764 [RESTART NEEDED HERE] node -v curl -sL http://deb.nodesource.com/setup_4.x | sudo -E bash sudo apt-get -y install nodejs git clone https://github.com/Azure-Samples/iot-hub-node-raspberrypi-client-app cd iot-hub-node-raspberrypi-client-app sudo npm install nano config.json if [ "x$deviceId" = "x" ]; then deviceId=RPi fi sudo node index.js 'DEVICE CONNECTION STRING'