diff --git a/init/pi_run.sh b/init/pi_run.sh index 5c5198bc..fa04c1b9 100644 --- a/init/pi_run.sh +++ b/init/pi_run.sh @@ -33,6 +33,14 @@ HOME=/home/pi GOPATH=$HOME/go RVPATH=$GOPATH/src/bitbucket.org/ausocean/av/cmd/rv PATH=$PATH:/usr/local/go/bin:$RVPATH +echo $RVPATH cd $RVPATH -sudo -u pi HOME=$HOME GOPATH=$GOPATH PATH=$PATH ./rv & -exit 0 +sudo -u pi HOME=$HOME GOPATH=$GOPATH PATH=$PATH ./rv +if [ $? -eq 0 ] +then + echo "Successfully exited rv" + exit 0 +else + echo "rv exited with code: $?" >&2 + exit 1 +fi