#! /bin/bash # # Return the version of the Raspberry Pi we are running on # Written by Andy Taylor (MW0MWZ) # # Pull the CPU Model from /proc/cpuinfo modelName=$(grep 'model name' /proc/cpuinfo | sed 's/.*: //') hardwareField=$(grep 'Hardware' /proc/cpuinfo | sed 's/.*: //') if [ -f /proc/device-tree/model ]; then raspberryModel=$(tr -d '\0' /dev/null 2>&1 sudo mount -o remount,rw / > /dev/null 2>&1 sudo git --work-tree=/usr/local/sbin --git-dir=/usr/local/sbin/.git pull origin master > /dev/null 2>&1 sudo rm -f /usr/local/sbin/pistar-upnp.service > /dev/null 2>&1 sudo git --work-tree=/usr/local/sbin --git-dir=/usr/local/sbin/.git reset --hard origin/master > /dev/null 2>&1 fi