init: unit service stays running

This commit is contained in:
Trek H 2020-05-16 23:48:11 +09:30
parent 3c2fefa8cb
commit d859dcbf4e
1 changed files with 10 additions and 2 deletions

View File

@ -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 &
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