Merged in update-init-rclocal (pull request #388)

init: updated rc.local and Makefile to reflect change of revid-cli to rv

Approved-by: Trek Hopton <trek.hopton@gmail.com>
This commit is contained in:
Saxon Milton 2020-03-23 10:22:12 +00:00
parent 19cbcfb08a
commit fc3c89231d
2 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
# Install files and directories required by NetSender clients (such as gpio-netsender, revid-cli, etc.)
# Install files and directories required by NetSender clients (such as gpio-netsender, rv, etc.)
# and create a dhcpcd.enter-hook for setting the MAC address.
# MA and DK can be optionally passed to Make, e.g, for a hard (first-time) installation:
# sudo MA=mac DK=dk install_hard
@ -19,11 +19,11 @@ endif
.SILENT:syncreboot
.SILENT:clean
install: as_root make_dirs soft_copy_files
@echo "Install complete"
install: as_root make_dirs soft_copy_files
@echo "Install complete"
install_hard: as_root make_dirs hard_copy_files set_mac syncreboot
@echo "Hard install complete"
@echo "Hard install complete"
as_root:
ifneq ($(USER),root)
@ -78,4 +78,4 @@ clean: as_root
rm -rf /var/log/netsender
rm -rf /etc/rc.local
rm -rf /etc/netsender.conf
@echo "Clean complete"
@echo "Clean complete"

View File

@ -1,8 +1,8 @@
#!/bin/sh -e
# /etc/rc.local
# This script launches revid-cli at boot time
# This script launches rv at boot time
REVIDPATH=/home/pi/go/src/bitbucket.org/ausocean/av/cmd/revid-cli
RVPATH=/home/pi/go/src/bitbucket.org/ausocean/av/cmd/rv
echo Set kernel parameters:
# kernel settings to improve performance on Raspberry Pi
@ -29,11 +29,11 @@ sudo ip addr show | grep inet
exec 2> /var/log/netsender/stream.log
exec 1>&2
# set env, working dir and run revid-cli as pi user
# set env, working dir and run rv as pi user
HOME=/home/pi
GOPATH=$HOME/go
REVIDPATH=$GOPATH/src/bitbucket.org/ausocean/av/cmd/revid-cli
PATH=$PATH:/usr/local/go/bin:$REVIDPATH
cd $REVIDPATH
sudo -u pi HOME=$HOME GOPATH=$GOPATH PATH=$PATH ./revid-cli -NetSender &
RVPATH=$GOPATH/src/bitbucket.org/ausocean/av/cmd/rv
PATH=$PATH:/usr/local/go/bin:$RVPATH
cd $RVPATH
sudo -u pi HOME=$HOME GOPATH=$GOPATH PATH=$PATH ./rv &
exit 0