mirror of https://bitbucket.org/ausocean/av.git
init: unit service stays running
This commit is contained in:
parent
3c2fefa8cb
commit
d859dcbf4e
|
@ -33,6 +33,14 @@ HOME=/home/pi
|
||||||
GOPATH=$HOME/go
|
GOPATH=$HOME/go
|
||||||
RVPATH=$GOPATH/src/bitbucket.org/ausocean/av/cmd/rv
|
RVPATH=$GOPATH/src/bitbucket.org/ausocean/av/cmd/rv
|
||||||
PATH=$PATH:/usr/local/go/bin:$RVPATH
|
PATH=$PATH:/usr/local/go/bin:$RVPATH
|
||||||
|
echo $RVPATH
|
||||||
cd $RVPATH
|
cd $RVPATH
|
||||||
sudo -u pi HOME=$HOME GOPATH=$GOPATH PATH=$PATH ./rv &
|
sudo -u pi HOME=$HOME GOPATH=$GOPATH PATH=$PATH ./rv
|
||||||
exit 0
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "Successfully exited rv"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "rv exited with code: $?" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue