Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got it running on debian buster #569

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 18 additions & 89 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ didBackup=false
# Checking for Backup
# check for old version (for the old ones...)
if [ -f $boswatchpath/BOSWatch/boswatch.py ]; then
echo "Old installation found!"
echo "A backup will be copied to $boswatchpath/old"
echo "Old installation found!"
echo "A backup will be copied to $boswatchpath/old"

mkdir /tmp/boswatch
mv $boswatchpath/BOSWatch/* /tmp/boswatch/
didBackup=true
mkdir /tmp/boswatch
mv $boswatchpath/BOSWatch/* /tmp/boswatch/
didBackup=true
fi

#and the future...
if [ -f $boswatchpath/boswatch.py ]; then
echo "Old installation found!"
echo "A backup will be copied to $boswatchpath/old"
echo "Old installation found!"
echo "A backup will be copied to $boswatchpath/old"

mkdir /tmp/boswatch
mv $boswatchpath/* /tmp/boswatch/
didBackup=true
mkdir /tmp/boswatch
mv $boswatchpath/* /tmp/boswatch/
didBackup=true
fi

# Check for Flags in command line
Expand Down Expand Up @@ -98,101 +98,30 @@ echo ""

# Update of computer
tput cup 13 15
echo "[ 1/9] [#--------]"
echo "[ 1/4] [#--------]"
tput cup 15 5
echo "-> make an apt-get update................"
apt-get update -y > $boswatch_install_path/setup_log.txt 2>&1

# download software
tput cup 13 15
echo "[ 2/9] [##-------]"
echo "[ 2/4] [##-------]"
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 python-pip >> $boswatch_install_path/setup_log.txt 2>&1
apt-get -y install git cmake build-essential libusb-1.0 qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libpulse-dev libx11-dev sox python2 rtl-sdr multimon-ng>> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? download stuff

# download BOSWatch via git
tput cup 13 15
echo "[ 3/9] [###------]"
echo "[ 3/4] [###------]"
tput cup 15 5
echo "-> download BOSWatch..................."
cd $boswatchpath/

case $branch in
"dev") git clone -b develop https://github.com/Schrolli91/BOSWatch . >> $boswatch_install_path/setup_log.txt 2>&1 && \
exitcodefunction $? git-clone BOSWatch-develop ;;
*) git clone -b master https://github.com/Schrolli91/BOSWatch . >> $boswatch_install_path/setup_log.txt 2>&1 && \
exitcodefunction $? git-clone BOSWatch ;;
esac

# Download RTL-SDR
tput cup 13 15
echo "[ 4/9] [####-----]"
tput cup 15 5
echo "-> download rtl_fm......................"
cd $boswatch_install_path
git clone https://github.com/Schrolli91/rtl-sdr.git >> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? git-clone rtl-sdr
cd rtl-sdr/

# Compie RTL-FM
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 >> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? cmake rtl-sdr

make >> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? make rtl-sdr

make install >> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? make-install rtl-sdr

ldconfig >> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? ldconfig rtl-sdr


# Download Multimon-NG
tput cup 13 15
echo "[ 6/9] [######---]"
tput cup 15 5
echo "-> download multimon-ng................"
cd $boswatch_install_path
git clone https://github.com/Schrolli91/multimon-ng.git multimonNG >> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? git-clone multimonNG

cd $boswatch_install_path/multimonNG/

# Compile Multimon-NG
tput cup 13 15
echo "[ 7/9] [#######--]"
tput cup 15 5
echo "-> compile multimon-ng................."
mkdir -p build
cd build
qmake ../multimon-ng.pro >> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? qmake multimonNG

make >> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? make multimonNG

make install >> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? qmakeinstall multimonNG

# Download & Install MySQL-Connector for Python via pip
tput cup 13 15
echo "[ 8/9] [########-]"
tput cup 15 5
echo "-> Download & Install MySQL connector for Python."
cd $boswatch_install_path
pip install mysql-connector-python >> $boswatch_install_path/setup_log.txt 2>&1
exitcodefunction $? install mysql-connector
Comment on lines -119 to -191
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this is removed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did throw errors on my system, especially the git part

git clone https://github.com/timniklas/BOSWatch $boswatchpath

# Blacklist DVB-Drivers
tput cup 13 15
echo "[9/9] [#########]"
echo "[4/4] [#########]"
tput cup 15 5
echo "-> configure..........................."
cd $boswatchpath/
Expand Down Expand Up @@ -221,8 +150,8 @@ cp $boswatchpath/config/config.template.ini $boswatchpath/config/config.ini

#replay the backup
if [ $didBackup = "true" ]; then
mkdir $boswatchpath/old/
mv /tmp/boswatch/* $boswatchpath/old/
mkdir $boswatchpath/old/
mv /tmp/boswatch/* $boswatchpath/old/
fi

if [ $reboot = "true" ]; then
Expand Down
4 changes: 2 additions & 2 deletions service/boswatch.service
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[Unit]
Description=BOSWatch
After=multi-user.target
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/python /opt/boswatch/boswatch.py -f 123.45M -a POC512
ExecStart=/usr/bin/python2 /opt/boswatch/boswatch.py -f 123.45M -a POC1200
Restart=on-abort

[Install]
Expand Down
62 changes: 0 additions & 62 deletions service/boswatch.sh

This file was deleted.