Change working directory to revid-cli's and set PATH to sudo.

This commit is contained in:
Alan Noble 2018-06-07 20:22:28 +09:30
parent 33ef0ce11d
commit 54fd0f383f
1 changed files with 3 additions and 4 deletions

View File

@ -21,13 +21,12 @@ if [ ! -d /var/netsender ]; then
chmod guo+rwx /var/netsender
fi
# include revid-cli in path (upgrade.sh must reside in this path too)
export PATH=$PATH:$REVIDPATH
# capture stdout and stderr to a secondary log file (just in case)
exec 2> /var/log/netsender/stream.log
exec 1>&2
sudo $REVIDPATH/revid-cli -Verbosity=Yes -Input=Raspivid -Output=NativeRtmp -QuantizationMode=QuantizationOff -RtmpUrl=$RTMPURL -Bitrate=500000 -Packetization=Flv -NetSender &
# set working dir and run revid-cli
cd $REVIDPATH
sudo "PATH=$PATH:$REVIDPATH" ./revid-cli -Verbosity=Yes -Input=Raspivid -Output=NativeRtmp -QuantizationMode=QuantizationOff -RtmpUrl=$RTMPURL -Bitrate=500000 -Packetization=Flv -NetSender &
exit 0