make virtualenv for mlat-client
This commit is contained in:
parent
6e28901e82
commit
ca84886ebb
2 changed files with 12 additions and 6 deletions
|
|
@ -6,7 +6,7 @@ After=network.target
|
|||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/default/adsbexchange
|
||||
ExecStart=/usr/bin/mlat-client \
|
||||
ExecStart=/usr/local/share/adsb-exchange/venv/bin/python3 /usr/local/share/adsb-exchange/venv/bin/mlat-client \
|
||||
--input-type $INPUT_TYPE --no-udp \
|
||||
--input-connect $INPUT \
|
||||
--server $MLATSERVER \
|
||||
|
|
|
|||
16
setup.sh
16
setup.sh
|
|
@ -140,7 +140,7 @@ fi
|
|||
|
||||
# Check that the prerequisite packages needed to build and install mlat-client are installed.
|
||||
|
||||
required_packages="build-essential debhelper python python3-dev socat ntp"
|
||||
required_packages="build-essential debhelper python python3-dev socat ntp python3-pip python3-virtualenv"
|
||||
progress=4
|
||||
|
||||
for package in $required_packages
|
||||
|
|
@ -163,7 +163,8 @@ fi
|
|||
# Check if the mlat-client git repository already exists.
|
||||
INSTALL_DIR=/usr/local/share/adsb-exchange
|
||||
MLAT_DIR=$INSTALL_DIR/mlat-client
|
||||
mkdir -p $INSTALL_DIR
|
||||
VENV=$INSTALL_DIR/venv
|
||||
mkdir -p $INSTALL_DIR >> $LOGFILE 2>&1
|
||||
if [ -d $MLAT_DIR ] && [ -d $MLAT_DIR/.git ]; then
|
||||
# If the mlat-client repository exists update the source code contained within it.
|
||||
cd $MLAT_DIR >> $LOGFILE
|
||||
|
|
@ -181,12 +182,17 @@ fi
|
|||
sleep 0.25
|
||||
|
||||
# Build and install the mlat-client package.
|
||||
dpkg-buildpackage -b -uc >> $LOGFILE 2>&1
|
||||
# dpkg-buildpackage -b -uc >> $LOGFILE 2>&1
|
||||
virtualenv -p /usr/bin/python3 $VENV >> $LOGFILE 2>&1
|
||||
source $VENV/bin/activate >> $LOGFILE 2>&1
|
||||
python3 setup.py build >> $LOGFILE 2>&1
|
||||
python3 setup.py install >> $LOGFILE 2>&1
|
||||
|
||||
|
||||
echo 44
|
||||
|
||||
cd .. >> $LOGFILE
|
||||
dpkg -i mlat-client_${MLATCLIENTVERSION}*.deb >> $LOGFILE 2>&1
|
||||
#cd .. >> $LOGFILE
|
||||
#dpkg -i mlat-client_${MLATCLIENTVERSION}*.deb >> $LOGFILE 2>&1
|
||||
|
||||
cd $CURRENT_DIR
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue