Add python3-pip, alsa-utils to install-script; Fix install-script to use GIT in boswatch3-folder, use running RTL-FM version

This commit is contained in:
Lars Gremme 2022-01-23 11:01:50 +01:00
parent 18d2ff7e1f
commit 112254b928
2 changed files with 43 additions and 40 deletions

View file

@ -4,10 +4,14 @@
## Version [3.0.1] - date
### Added
* Divera24/7-Plugin
* Python3-pip for requirements in install-script
* Alsa-utils in install-script
### Changed
### Deprecated
### Removed
### Fixed
* Install-Script to use GIT in boswatch3-folder
* Running RTL-FM Version (on RPi buster)
### Security
## Version [2.9.0] - date

View file

@ -37,17 +37,17 @@ function exitcodefunction {
module=$3
if [ $errorcode -ne "0" ]; then
echo "Action: $action on $module failed." >> $boswatchpath/install/setup_log.txt
echo "Exitcode: $errorcode" >> $boswatchpath/install/setup_log.txt
echo "Action: ${action} on ${module} failed." >> ${boswatch_install_path}/setup_log.txt
echo "Exitcode: ${errorcode}" >> ${boswatch_install_path}/setup_log.txt
echo ""
echo "Action: $action on $module failed."
echo "Exitcode: $errorcode"
echo "Action: ${action} on ${module} failed."
echo "Exitcode: ${errorcode}"
echo ""
echo " -> If you want to open an issue at https://github.com/BOSWatch/BW3-Core/issues"
echo " please post the logfile, located at $boswatchpath/install/setup_log.txt"
echo " please post the logfile, located at ${boswatch_install_path}/setup_log.txt"
exit 1
else
echo "Action: $action on $module ok." >> $boswatchpath/install/setup_log.txt
echo "Action: ${action} on ${module} ok." >> ${boswatch_install_path}/setup_log.txt
fi
}
@ -76,6 +76,7 @@ echo "Caution, script does not install a webserver with PHP and MySQL"
echo "So you have to make up manually if you want to use MySQL support"
boswatchpath=/opt/boswatch3
boswatch_install_path=/opt/boswatch3_install
reboot=false
for (( i=1; i<=$#; i=$i+2 )); do
@ -83,11 +84,11 @@ for (( i=1; i<=$#; i=$i+2 )); do
eval arg=\$$i
eval arg2=\$$t
case $arg in
case ${arg} in
-r|--reboot) reboot=true ;;
-b|--branch)
case $arg2 in
case ${arg2} in
dev|develop) echo " !!! WARNING: you are using the DEV BRANCH !!! "; branch=dev ;;
*) branch=master ;;
esac ;;
@ -98,8 +99,7 @@ for (( i=1; i<=$#; i=$i+2 )); do
esac
done
mkdir -p $boswatchpath
mkdir -p $boswatchpath/install
mkdir -p ${boswatchpath} ${boswatch_install_path}
echo ""
@ -107,57 +107,58 @@ tput cup 13 15
echo "[ 1/9] [#--------]"
tput cup 15 5
echo "-> make an apt-get update................"
apt-get update -y > $boswatchpath/install/setup_log.txt 2>&1
apt-get update -y > ${boswatch_install_path}/setup_log.txt 2>&1
tput cup 13 15
echo "[ 2/9] [##-------]"
tput cup 15 5
echo "-> download GIT and other stuff.........."
apt-get -y install git cmake build-essential libusb-1.0 qt4-qmake qt4-default libpulse-dev libx11-dev sox >> $boswatchpath/install/setup_log.txt 2>&1
apt-get -y install git cmake build-essential libusb-1.0 qt5-qmake libpulse-dev libx11-dev sox >> ${boswatch_install_path}/setup_log.txt 2>&1
exitcodefunction $? download stuff
tput cup 13 15
echo "[ 3/9] [###------]"
tput cup 15 5
echo "-> download Python, Yaml and other stuff.."
sudo apt-get -y install python3 python3-yaml >> $boswatchpath/install/setup_log.txt 2>&1
sudo apt-get -y install python3 python3-yaml python3-pip alsa-utils>> ${boswatch_install_path}/setup_log.txt 2>&1
exitcodefunction $? download python
tput cup 13 15
echo "[ 4/9] [####-----]"
tput cup 15 5
echo "-> download rtl_fm........................."
cd $boswatchpath/install
git clone --branch v0.5.4 https://github.com/osmocom/rtl-sdr.git rtl-sdr >> $boswatchpath/install/setup_log.txt 2>&1
cd ${boswatch_install_path}
git clone --branch master https://github.com/osmocom/rtl-sdr.git rtl-sdr >> ${boswatch_install_path}/setup_log.txt 2>&1
cd ${boswatch_install_path}/rtl-sdr/
git checkout 2659e2df31e592d74d6dd264a4f5ce242c6369c8
exitcodefunction $? git-clone rtl-sdr
cd $boswatchpath/install/rtl-sdr/
tput cup 13 15
echo "[ 5/9] [#####----]"
tput cup 15 5
echo "-> compile rtl_fm......................"
mkdir -p build && cd build
cmake ../ -DINSTALL_UDEV_RULES=ON >> $boswatchpath/install/setup_log.txt 2>&1
cmake ../ -DINSTALL_UDEV_RULES=ON >> ${boswatch_install_path}/setup_log.txt 2>&1
exitcodefunction $? cmake rtl-sdr
make >> $boswatchpath/install/setup_log.txt 2>&1
make >> ${boswatch_install_path}/setup_log.txt 2>&1
exitcodefunction $? make rtl-sdr
make install >> $boswatchpath/install/setup_log.txt 2>&1
make install >> ${boswatch_install_path}/setup_log.txt 2>&1
exitcodefunction $? make-install rtl-sdr
ldconfig >> $boswatchpath/install/setup_log.txt 2>&1
ldconfig >> ${boswatch_install_path}/setup_log.txt 2>&1
exitcodefunction $? ldconfig rtl-sdr
tput cup 13 15
echo "[ 6/9] [######---]"
tput cup 15 5
echo "-> download multimon-ng................"
cd $boswatchpath/install
git clone --branch 1.1.8 https://github.com/EliasOenal/multimon-ng.git multimonNG >> $boswatchpath/install/setup_log.txt 2>&1
cd ${boswatch_install_path}
git clone --branch 1.1.8 https://github.com/EliasOenal/multimon-ng.git multimonNG >> ${boswatch_install_path}/setup_log.txt 2>&1
exitcodefunction $? git-clone multimonNG
cd $boswatchpath/install/multimonNG/
cd ${boswatch_install_path}/multimonNG/
tput cup 13 15
echo "[ 7/9] [#######--]"
@ -165,25 +166,26 @@ tput cup 15 5
echo "-> compile multimon-ng................."
mkdir -p build
cd build
qmake ../multimon-ng.pro >> $boswatchpath/install/setup_log.txt 2>&1
# Export environment variable for qt5
export QT_SELECT=qt5
qmake ../multimon-ng.pro >> ${boswatch_install_path}/setup_log.txt 2>&1
exitcodefunction $? qmake multimonNG
make >> $boswatchpath/install/setup_log.txt 2>&1
make >> ${boswatch_install_path}/setup_log.txt 2>&1
exitcodefunction $? make multimonNG
make install >> $boswatchpath/install/setup_log.txt 2>&1
make install >> ${boswatch_install_path}/setup_log.txt 2>&1
exitcodefunction $? qmakeinstall multimonNG
tput cup 13 15
echo "[ 8/9] [########-]"
tput cup 15 5
echo "-> download BOSWatch3.................."
cd $boswatchpath/
case $branch in
"dev") git clone -b develop https://github.com/BOSWatch/BW3-Core >> $boswatchpath/install/setup_log.txt 2>&1 && \
case ${branch} in
"dev") git clone -b develop https://github.com/BOSWatch/BW3-Core ${boswatchpath} >> ${boswatch_install_path}/setup_log.txt 2>&1 && \
exitcodefunction $? git-clone BW3-Core-develop ;;
*) git clone -b master https://github.com/BOSWatch/BW3-Core >> $boswatchpath/install/setup_log.txt 2>&1 && \
*) git clone -b master https://github.com/BOSWatch/BW3-Core ${boswatchpath} >> ${boswatch_install_path}/setup_log.txt 2>&1 && \
exitcodefunction $? git-clone BW3-Core ;;
esac
@ -191,22 +193,22 @@ tput cup 13 15
echo "[9/9] [#########]"
tput cup 15 5
echo "-> configure..........................."
cd $boswatchpath/
cd ${boswatchpath}/
chmod +x *
echo $'# BOSWatch3 - blacklist the DVB drivers to avoid conflicts with the SDR driver\n blacklist dvb_usb_rtl28xxu \n blacklist rtl2830\n blacklist dvb_usb_v2\n blacklist dvb_core' >> /etc/modprobe.d/boswatch_blacklist_sdr.conf
tput cup 17 1
tput rev # Schrift zur besseren lesbarkeit Revers
echo "BOSWatch is now installed in $boswatchpath/ Installation ready!"
echo "BOSWatch is now installed in ${boswatchpath}/ Installation ready!"
tput sgr0 # Schrift wieder Normal
tput cup 19 3
echo "Watch out: to run BOSWatch3 you have to modify the server.yaml and client.yaml!"
echo "Do the following step to do so:"
echo "sudo nano $boswatchpath/config/client.yaml eg. server.yaml"
echo "sudo nano ${boswatchpath}/config/client.yaml eg. server.yaml"
echo "and modify the config as you need. This step is optional if you are upgrading an old version of BOSWatch3."
echo "You can read the instructions on https://docs.boswatch.de/"
tput setaf 1 # Rote Schrift
echo "Please REBOOT bevor the first start"
echo "Please REBOOT before the first start"
tput setaf 9 # Schrift zurücksetzen
echo "start Boswatch3 with"
echo "sudo python3 bw_client.py -c client.yaml and sudo python3 bw_server.py -c server.yaml"
@ -214,12 +216,9 @@ echo "sudo python3 bw_client.py -c client.yaml and sudo python3 bw_server.p
tput cnorm
# cleanup
mkdir $boswatchpath/log/install -p
mv $boswatchpath/install/setup_log.txt $boswatchpath/log/install/
rm $boswatchpath/install/ -R
mv $boswatchpath/BW3-Core/* $boswatchpath/
rm $boswatchpath/BW3-Core -R
mkdir ${boswatchpath}/log/install -p
mv ${boswatch_install_path}/setup_log.txt ${boswatchpath}/log/install/
rm ${boswatch_install_path} -R
if [ $reboot = "true" ]; then
/sbin/reboot